BookmarkSubscribeRSS Feed
Rachel_L
Calcite | Level 5

Dear all,

The missingness of  all variables of interest was ranged from 3.3% to 12% in my dataset (simple cross-sectional and single-level). I was trying to conduct 3-way MANOVA use ML to handle missing data but constantly got errors.

How should I fix it? Do I have to use PROC MIXED to get ML estimates, although my dataset is not mixed.

Thank you very much!

proc mixed data = mydata method=ml;

class x1 x2 x3;

model y1 y2 y3 y4 = x1 x2 x3 x1*x2 x1*x3 x2*x3;

run;

1 REPLY 1
SteveDenham
Jade | Level 19

One way would be to translate the data into a form where y1 through y4 are considered repeated measures on each subject (not necessarily repeated in time, but representing multiple measures on each subject).

data long;

set mydata;

value=y1;type=1;output;

value=y2;type=2;output;

value=y3;type=3;output;

value=y4;type=4;output;

drop y1-y4;

run;

The following code assumes that there is some variable that indexes the subjects, which I will refer to as subjectid.

proc mixed data=long;

class x1 x2 x3 type subjectid;

model value=x1|x2|x3@2 type;

repeated type/subject=subjectid type=un;

run;

Now, you may need to cross type with the x variables to get reasonable least squares means for the 4 y values.  In that case, I would change the code to:

proc mixed data=long;

class x1 x2 x3 type subjectid;

model value=x1|x2|x3|type;

repeated type/subject=subjectid type=un;

lsmeans <insert appropriate combinations here>;

run;

Steve Denham


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
  • 1 reply
  • 1606 views
  • 1 like
  • 2 in conversation