Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

proc mixed (repeated measurement and unstructered variance matrix)

16 views
Skip to first unread message

sousimou

unread,
Aug 5, 2011, 5:23:06 AM8/5/11
to
Hi everyone,

my data is regarding differents measurments over time for subjects.
I am using proc mixed to model data with repeated measurment, with
unstructered var-covar matrix. I want to extract the variance between
and within subjects for each group and at each time. Can you help me
how to do it?

this is my code :

%LET sub_var=.5;
%LET res_var=.9;
%LET nsb=50;
%LET seed=1928;
%LET nb_grp=3;

DATA tme;
Do i=1 to &nb_grp.;
DO subj = 1 to &nsb.;
DO time=1 to 4;
y = &sub_var.*rannor(&&seed.*i) + 1*(time=1)+ 2*(time=2)+
2*(time=3)+3*(time=4)
+ &res_var. *rannor(&&seed.*i);
group=compress("group"||i);
output;
end;
end;
END;
RUN;

PROC MIXED DATA=tme METHOD=ML NOCLPRINT=10 SCORING=3 CL;
CLASS time group subj;
MODEL y = time group group*time
/ DDFM=KR OUTPRED=predict RESIDUALS;
REPEATED time / TYPE=UNR SUBJECT=subj GROUP=group /*rcorr*/ R;
ODS OUTPUT COVPARMS=cov;
RUN;


thank you

0 new messages