Date: Thu, 20 May 2010 15:05:54 0700
ReplyTo: Dale McLerran <stringplayer_2@YAHOO.COM>
Sender: "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU>
From: Dale McLerran <stringplayer_2@YAHOO.COM>
Subject: Re: how to write a repeated measures statement for two blocks of
time series
InReplyTo: <444582.79645.qm@web51007.mail.re2.yahoo.com>
ContentType: text/plain; charset=iso88591
 Original Message 
From: Xin Wei <xinwei@STAT.PSU.EDU>
To: SASL@LISTSERV.UGA.EDU
Sent: Wed, May 19, 2010 5:04:32 PM
Subject: how to write a repeated measures statement for two blocks of time series
>
> three groups of animals are receiving vehicle, drugA and drugB on the
> morning of day 1 and day7. After drug administration, their ECG is
> continuously measured during the day. therefore, each animal has two
> blocs of time series: day1 (post treatment time: 1h, 2h, 4h, 10h....etc)
> and day7 (post treatment time: 1h, 2h, 4h, 10h.....etc). I am hoping to
> pool the two days' data together for analysis in order to achieve the
> best error estimation and statistical power. Apparently, it may not be
> appropriate to assume the time correlation structure for day 1 is the
> same to that for day 7. It is also wrong to assume the same correlation
> between day1_1hr/day1_2hr and day1_1hr/day7_1hr. Unfortunately, I am not
> quite sure how to write the correct repeated measures statement for this
> unique scenario. Had I only had one day data, it would be
> straightforward to write something like the followings:
>
> proc mixed data=data method=reml covtest;
> Â Â class id trt time;
> Â Â model value=trt time trt*time;
> Â Â repeated time/sub=id(trt)Â type=AR(1) r;
> run;
>
> any suggestion is appreciated!
>
I would suggest that you look at the direct product covariance
structures. See the REPEATED statement documentation and search
the page for "direct product". Instead of the REPEATED statement
that you are using, you might use:
repeated trt time / sub=id type=un@ar(1) r;
The dire product covariance structure assumes a common AR(1) over
time for each treatment, and that there is a withinsubject
correlation between treatments. It seems that this is the sort
of covariance structure that you want to use, is it not?
More preferable than the direct product covariance structure
would be to use a spatial covariance structure. I would note
that the time between measurements following each treatment is not
uniform. The AR(1) covariance structure is generally employed
when there is a uniform spacing of events over time. If you did
have uniform spacing, then for your problem where there are only
two treatments, a REPEATED statement using the SP(POWA)(time trt)
covariance specification should produce the same results as
the direct product covariance structure (assuming an AR(1) model
for each treatment) if you coded time as 1, 2, 3, 4, ... rather
than coding time as 1, 2, 4, 10, ...
The AR(1) covariance structure assumes that the correlation between
hours 1 and 2 is the same as the correlation between hours 2 and 4
and also the same as the correlation between hours 4 and 10 (etc.).
That may not be a valid assumption. It may well be that the
correlation between hours 1 and 2 is rho, the correlation between
hours 2 and 4 is rho**2, and the correlation between hours 4 and
10 is rho**6. The spatial anisotropic power structure would
construct the latter model. The appropriate REPEATED statement
would for this structure would be
repeated / subject=id type=sp(POWA)(trt time) r;
HTH,
Dale

Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph: (206) 6672926
Fax: (206) 6675977

