LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 18 Sep 2008 11:39:06 -0700
Reply-To:     jn_mao@yahoo.com
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         jn mao <jn_mao@YAHOO.COM>
Subject:      Re: Contrast question-different number of degree
Comments: To: Robin R High <rhigh@UNMC.EDU>
In-Reply-To:  <OFC93C711F.249DBB34-ON862574C8.005E9531-862574C8.00611896@unmc.edu>
Content-Type: text/plain; charset=iso-8859-1

Thanks Robin,   Here is my mixed model code, proc mixed ; class group subj hr; model y=group hr group*hr /s; contrast "overall 1 VS 2" group 1 -1  ; contrast "1 vs 2 by hours" group 1 -1 group*hr 1 0 0 0 -1 0 0 0,                    group 1 -1 group*hr 0 1 0 0 0 -1 0 0,                    group 1 -1 group*hr 0 0 1 0 0 0 -1 0,                    group 1 -1 group*hr 0 0 0 1 0 0 0 -1; random group /subject=subj type=vc; run;   I wonder why my Den DF is 123, but 41, and my total subject is 44. Any corrections on my code?   Jane

--- On Thu, 9/18/08, Robin R High <rhigh@UNMC.EDU> wrote:

From: Robin R High <rhigh@UNMC.EDU> Subject: Re: Contrast question To: SAS-L@LISTSERV.UGA.EDU Date: Thursday, September 18, 2008, 12:40 PM

Jane,

It would help to see your code for the MIXED model and example of what time represents. You can combine the four contrasts into one statement to get the NumDF=4, but don't see why you particularly want the DenDF=41 when an ANOVA table shows that degrees of freedom for the error term (with complete data for all 44 subjects) for the group*hr effect is.

Source DF

group 1 subj(group) 42 hr 3 group*hr 3 hr*subj(group) 126 ***

PROC MIXED nobound; CLASS group hr subj; model y = group hr group*hr ; contrast "1 vs 2" group 1 -1 group*hr 1 0 0 0 -1 0 0 0, group 1 -1 group*hr 0 1 0 0 0 -1 0 0, group 1 -1 group*hr 0 0 1 0 0 0 -1 0, group 1 -1 group*hr 0 0 0 1 0 0 0 -1; random subj(group); run;

If necessary, you can change the degrees of freedom for the three fixed effects with the ddf= option (rather than ddfm=contain is default for random effects)

And depending on what time is, perhaps a REPEATED statement with ar(1) or something that takes into account a time related correlation structure would work better, that is, replace the RANDOM statement with:

REPEATED hr / subject=subj(group) type=AR(1) rcorr;

Robin High UNMC

jn mao <jn_mao@YAHOO.COM> Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 09/18/2008 11:42 AM Please respond to jn_mao@yahoo.com

To SAS-L@LISTSERV.UGA.EDU cc

Subject Contrast question

Hello SAS-Ls,I'm trying to compare different of outcome1 between two groups by each time pointusing mixed model and random method.I have 44 subjects in 2 groups and 4 time point meansurements per subject.My contrast code is:contrast "overall group1 VS group2" group 1 -1;contrast "1 vs 2 at 1st hour" group 1 -1 group*hr 1 0 0 0 -1 0 0 0;contrast "1 vs 2 at 2nd hour" group 1 -1 group*hr 0 1 0 0 0 -1 0 0;contrast "1 vs 2 at 3rd hour" group 1 -1 group*hr 0 0 1 0 0 0 -1 0;contrast "1 vs 2 at 4th hour" group 1 -1 group*hr 0 0 0 1 0 0 0 -1; However, this code gave the contrast Num DF and Den DF based on total data (Num DF=1, Den DF=123)how could I code to get NumDF=4, and Den DF=41, or the degree is based on total subjects? Thanks much! Jane


Back to: Top of message | Previous page | Main SAS-L page