a********a 发帖数: 346 | 1 data one;
input lake $ bacteria;
datalines;
Pristine 3933
Pristine 458
Pristine 94
Vacation 862
Vacation 437
Vacation 538
Pleasant 4481
Pleasant 276
Pleasant 4208
Sardine 7456
Sardine 4394
;
I want to test the mean of different lakes. So I used the following sas code,
proc glm data=one;
class lake;
model bacteria=lake;
run;
I know sas will treat 'Vacation' lake as the control group. If I want to use
'Pristine' as control group, how do I write in sas code |
S***e 发帖数: 108 | 2 data two;
set one;
if lake='Pristine' then group=4;
else if lake='Vacation' then group=1;
else if lake='Pleasant' then group=2;
else if lake='Sardine' then group=3;
else group=.;
run;
proc glm data=two;
class group;
model bacteria=group/solution;
run; |
a********a 发帖数: 346 | 3 Yes, creating dummy variables is a way to it. Is there any way to write such
like reference='Pristine' in proc glm? I know we can write ref='' in proc
logistic.
Thanks |
S***e 发帖数: 108 | 4 I don't think so.
Please read SAS help to make sure of it. |