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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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