BookmarkSubscribeRSS Feed
brs2012
Calcite | Level 5

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.

2 REPLIES 2
SteveDenham
Jade | Level 19

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

brs2012
Calcite | Level 5

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!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 482 views
  • 0 likes
  • 2 in conversation