N/A
Posts: 1

# How to conduct 3-way MANOVA using Maximum Likelihood?

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;

Posts: 2,655

## Re: How to conduct 3-way MANOVA using Maximum Likelihood?

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

Discussion stats