BookmarkSubscribeRSS Feed
mjwenger
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";
run;

/* --- 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,

 

-Michael

4 REPLIES 4
PaigeMiller
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: https://communities.sas.com/t5/Statistical-Procedures/Interpreting-Multivariate-Linear-Regression-wi...

--
Paige Miller
mjwenger
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.

PaigeMiller
Diamond | Level 26

Use LSMEANS and not the actual estimated coefficients.

--
Paige Miller
mjwenger
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.

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 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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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