Date: Wed, 8 Aug 2007 11:12:19 -0500
Reply-To: "Swank, Paul R" <Paul.R.Swank@UTH.TMC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Swank, Paul R" <Paul.R.Swank@UTH.TMC.EDU>
Subject: Re: RM ANOVA CODE
In-Reply-To: <7367b4e20708080811k5b01d85du980c65997464dad9@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
There is no need to include a treatment variable if there is none.
However, the form of the variance covariance marix is important. If the
data is equally spaced between visits, then an AR(1) matrix might be
better, given the repeated measures data. If not, it can be sdone with a
Spatial form where you include a variable that specifies the amount of
time between visits. This needs at least to be checked.
Paul R. Swank, Ph.D. Professor
Director of Reseach
Children's Learning Institute
University of Texas Health Science Center-Houston
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
data _null_;
Sent: Wednesday, August 08, 2007 10:11 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: RM ANOVA CODE
As Mr. Johnson said there are many examples online.
Google is your friend.
I found an example and adapted your data as follows...
data work.test; /* five visits*/
input pat_id @;
trt = mod(_n_,2); /*no treatment so make one*/
do visit = 1 to 5;
input y @;
output;
end;
/*Pat_id Visit_1 Visit_2 Visit_3 Visit_4 Visit_5*/
cards;
101 45 6 7 59 48
102 67 59 78 35 41
204 98 65 79 57 36
209 68 47 59 64 63
303 47 98 56 37 49
305 49 67 58 59 67
;;;;
run;
proc print;
run;
PROC MIXED;
CLASS pat_id trt visit;
MODEL y = trt visit trt*visit;
REPEATED visit / SUBJECT=pat_id TYPE=CS;
run;
On 8/8/07, RAMS <ramsathish@gmail.com> wrote:
> I dont know to write a code. I will be happy if i get a syntax of
> either PROC GLM or PROC MIXED.
>