Dear sir/madam
Would you please help me in analyzing the data below? I ran the syntax below but I can't get the result in the university version of sas.
best regards,
''
data;
input kids Trt week gain;
cards;
1 1 9 1.2
2 1 9 1.2
3 1 9 1.3
4 1 9 1.1
5 1 9 1.2
6 1 9 1.1
7 1 9 1.1
8 1 9 1.3
1 2 9 1.2
2 2 9 1.3
3 2 9 1.5
4 2 9 1.4
5 2 9 1.2
6 2 9 1
7 2 9 1.4
8 2 9 1.1
9 2 9 1.2
1 1 10 1
2 1 10 1.1
3 1 10 1.4
4 1 10 1.1
5 1 10 1.3
6 1 10 1.1
7 1 10 1.2
8 1 10 1.3
1 2 10 1.5
2 2 10 1.2
3 2 10 1.7
4 2 10 1.5
5 2 10 1.2
6 2 10 1.1
7 2 10 1.8
8 2 10 1.3
9 2 10 1.5
1 1 11 1.1
2 1 11 1.4
3 1 11 1.4
4 1 11 1.2
5 1 11 1.2
6 1 11 1.1
7 1 11 1.3
8 1 11 1.3
1 2 11 1.9
2 2 11 1.4
3 2 11 1.6
4 2 11 1.7
5 2 11 1.4
6 2 11 1.4
7 2 11 2.1
8 2 11 1.4
9 2 11 1.7
1 1 12 1.3
2 1 12 1.5
3 1 12 1.6
4 1 12 1.3
5 1 12 1.3
6 1 12 1.2
7 1 12 1.5
8 1 12 1.4
1 2 12 2.1
2 2 12 1.7
3 2 12 1.7
4 2 12 1.8
5 2 12 1.6
6 2 12 1.5
7 2 12 2.1
8 2 12 1.8
9 2 12 1.9
PROC glm;
CLASS kids Trt week gain;
MODEL gain = Trt week Trt*week / ;
REPEATED / TYPE=CS SUB=kid(Trt) ;
Means Trt/ LSD Duncan;
LSMEANS Trt / DIFF STDERR;
RUN; ''
Try adding ;run just after your last data line?
Hi alula, can you show the log?
Try removing the “/“ at the end of the MODEL line since you aren’t specifying any options for the model.
-unison
This runs, it looks like the repeated line is the culprit -- those options work on PROC MIXED but not on PROC GLM. You'll need to find the equivalent GLM set of options for what you're trying to do.
PROC glm;
CLASS kids Trt week gain;
MODEL gain = Trt week Trt*week;
/*REPEATED / TYPE=CS SUB=kid(Trt);*/
Means Trt/LSD Duncan;
LSMEANS Trt / DIFF STDERR;
RUN;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.