BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alula
Fluorite | Level 6

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; ''

1 ACCEPTED SOLUTION

Accepted Solutions
unison
Lapis Lazuli | Level 10

Try adding ;run just after your last data line?

-unison

View solution in original post

6 REPLIES 6
unison
Lapis Lazuli | Level 10

Try adding ;run just after your last data line?

-unison
alula
Fluorite | Level 6
I did it but still not working.
alula
Fluorite | Level 6
 
unison
Lapis Lazuli | Level 10

Try removing the “/“ at the end of the MODEL line since you aren’t specifying any options for the model. 

-unison

-unison
unison
Lapis Lazuli | Level 10

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;
-unison

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 6 replies
  • 1114 views
  • 0 likes
  • 2 in conversation