BookmarkSubscribeRSS Feed
Fluorite | Level 6

All -- I'm attempting to run a repeated measures ANOVA using proc glm. The problem I'm encountering is that I'm getting pathological estimates (or no estimates) of the the main effect for one of the repeated factors and the interactions involving that factor. The data consist of a between-subjects factor (Group) and two within-subjects factors Response_Type and Stage, each with two levels. Here is the section of code that I've written for the analysis:


/* --- code starts here --- */

proc print data = frn_ii7; title "frn_ii7"; run;
proc glm data = frn_ii7;
    class Group;
model frn1-frn4 = Group  / effectsize nouni;
means Group / tukey lines;
repeated Response_Type 2, Stage 2 / summary;
title "MAID: PST FRN II Amplitudes as a Function of Group, Response Type, and Stage";
label frn1 = "FRN Amplitude (uV), incorrect early"
  frn2 = "FRN Amplitude (uV), incorrect late"
  frn3 = "FRN Amplitude (uV), correct early"
  frn4 = "FRN Amplitude (uV), correct late";

/* --- code ends here --- */


I first print out the data set to see if there are any obvious problems, and then runs the repeated measures ANOVA. I've attached the section of the listing that is produced. 


In the printout of the data set, I don't see any obvious problems other than one subject missing data for the dependent variables (frn1-frn4). glm produces the Tukey tests for the effect of Group for each of the variables, the number of observations is correct, the repeated measures level information is correct, but the information for the main effect of Response_Type and the interactions involving Response_Type are all missing. The estimate of the main effect of Group is provided, the estimate of the main effect of stage is provided, but anything involving Response_Type is blank. I've never run into this problem with proc glm, and this code works with a different data set that has the same structure, which suggests that there is something "wrong" with this data set. But I don't see anything obvious.


Can anyone provide any insight into this? My thanks in advance,



Diamond | Level 26

This is expected. That's how SAS has chosen as the default to handle categorical factors, one level will not get estimated. I wrote a brief explanation:

Paige Miller
Fluorite | Level 6

Thanks for the quick reply, but I remain confused as this code produces interpretable results with a different data set that has the same structure.

Diamond | Level 26

Use LSMEANS and not the actual estimated coefficients.

Paige Miller
Fluorite | Level 6

Thanks again, and problem solved: it turned that there was an error in the creation of the data file, such that the values for every observation across the two levels of the factor in question were identical. Fixed that error and now everything works as it should.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1 like
  • 2 in conversation