Date: Tue, 13 Jul 2010 08:24:10 -0500
Reply-To: Robin R High <rhigh@UNMC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Robin R High <rhigh@UNMC.EDU>
Subject: Re: PROC MIXED - why would AR(1) model be exactly like CS model?
In-Reply-To: <001f01cb228b$1789b390$469d1ab0$@com>
Content-Type: text/plain; charset="US-ASCII"
Peter,
Typically with longitudinal data, one treats the covariance matrix as
R-Side (residual) and applies the REPEATED statement with MIXED for these
situations. Perhaps one is now more easily led astray since GLIMMIX has
only a RANDOM statement with the residual option to be added.
repeated pid/type = cs subject = pid R ;
repeated pid/type = ar(1) subject = pid R;
will likely give you different results. You get the same results with
RANDOM because there is only 1 random factor.
Robin High
UNMC
From:
Peter Flom <peterflomconsulting@MINDSPRING.COM>
To:
SAS-L@LISTSERV.UGA.EDU
Date:
07/13/2010 08:02 AM
Subject:
PROC MIXED - why would AR(1) model be exactly like CS model?
Sent by:
"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Hello
I am working with a longitudinal data set. Six waves of data on 37
people.
With such data, I usually try CS and AR(1) and sometimes other structures.
This time, I get identical results from the two structures (same parameter
estimates, same fit indexes etc) and the estimate for the covariance for
AR(1) is 0 (although it is not 0 for CS.
PID = ID number
ITT is a class variable for treated vs. control
Anxdep is the dependent variable, a measure of anxiety and depression
Wave is the wave number (1 to 6).
Code for CS:
<<<<<<<<<<
title 'ITT analysis';
title2 'Factor 1: AnxietyDepression';
title3 'Random intercepts only';
title4 'CS covariances';
ods html;
ods graphics on;
proc mixed data = schooler.long plots=studentpanel (marginal);
class pid itt;
model anxdep = itt wave itt*wave/solution residual;
random pid/type = cs subject = pid;
run;
ods graphics off;
ods html close;
>>>>>>>>>>>>>
Code for AR(1)
<<<<<<<<<
title4 'AR(1) covariances';
ods html;
ods graphics on;
proc mixed data = schooler.long plots=studentpanel (marginal);
class pid itt;
model anxdep = itt wave itt*wave/solution residual;
random pid/type = ar(1) subject = pid;
run;
ods graphics off;
ods html close;
>>>>>>>>>>>
What am I missing here?
Thanks
Peter
Peter Flom PhD.
Peter Flom Consulting LLC
5 Penn Plaza, Ste 2342
NY NY 10001
www.statisticalanalysisconsulting.com
www.IAmLearningDisabled.com