I am running multivariate multilevel growth model on SAS 9.3 (x64bit) with two random components (one for intercept and one for slope). I have two or more dependent variables (DV). My data are structured as follows in which med is the dummy for two DVs:
enrolid med adh t t1 age
1 x 70 1 1 45
1 x 34 2 2 45
1 x 54 3 3 45
1 y 45 1 1 45
1 y 34 2 2 45
1 y 56 3 3 45
2 x 70 1 1 66
2 x 39 2 2 66
2 x 59 3 3 66
2 y 45 1 1 66
2 y 64 2 2 66
2 y 46 3 3 66
* Means Model;
proc mixed data= mult covtest asycorr noclprint;
class enrolid med t1;
model adh = med age med*age /noint s;
random med /type=un sub=enrolid g gcorr;
repeated /type=vc group=med subject=enrolid;
run;
* Growth model;
proc mixed data= mult covtest asycorr noclprint;
class enrolid med t1 ;
model adh = med age t med*t med*age /noint s;
random med med*t /type=un sub=enrolid g gcorr;
repeated /type=vc group=med subject=enrolid;
run;
The above models run. However, when I try to change specifications on the repeated statement it does NOT work (eg., infinite likelihood is assumed..., non positive definite, etc). My data do not have duplicate rows. I am trying to specify a correlated R within each med type and I used '' repeated med/type=un subject=enrolid". Also, I tried '' repeated t1/ type=un group=med subject=enrolid", it does not resolve.
Where am I wrong? Please help me with appropriate coding for testing an alternative/correlated R-side specification.
I see a couple of problems that may lead to what is happening. First, is this the complete dataset? If so, enrolid and age are completely confounded. If it turns out that this is the case for the full dataset, then the problem lies in correctly identifying the subject. Try subject=enrolid*med, and see what happens in the growth model:
proc mixed data= mult covtest asycorr noclprint;
class enrolid med t1 ;
model adh = med age t med*t med*age /noint s;
random med med*t /type=un sub=enrolid g gcorr;
repeated t1/type=ar(1) subject=enrolid*med;
run;
If this doesn't help, then maybe, with a larger sample dataset, we can come up with an alternative.
Steve Denham
Thanks Steve! The actual dataset has more than 2000 subjects with 4 or more observations for each enrolid for each type of med. My SAS is down until Jan 1 and I will inform you. Thanks again!
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.