R side specification in Proc Mixed

Reply
Occasional Contributor
Posts: 9

R side specification in Proc Mixed

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.

Respected Advisor
Posts: 2,655

Re: R side specification in Proc Mixed

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

Occasional Contributor
Posts: 9

Re: R side specification in Proc Mixed

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!

Ask a Question
Discussion stats
  • 2 replies
  • 235 views
  • 0 likes
  • 2 in conversation