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 (August 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 26 Aug 2004 14:36:54 -0700
Reply-To:     Dale McLerran <stringplayer_2@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dale McLerran <stringplayer_2@YAHOO.COM>
Subject:      Re: Type 3 test of  fixed effects and "Solution" command don't
              give              same results
Comments: To: anne olean <annekolean@yahoo.com>
In-Reply-To:  <20040825225421.68322.qmail@web61208.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii

Anne,

The solutions and the Type 3 test of fixed effects tables examine different contrasts, at least for lower order terms in a model that has interactions. The code below generates data like that which might be seen in a factorial design. There are two factors, A and B, each of which has two levels. We observe 25 responses at each combination of A and B. (Note that in the simulation below, there are no effects of either A or B on the response. However, we can still use this little simulation to demonstrate the different contrasts which are reported in the solutions table and the Type 3 table.)

/* Generate data from factorial design with factors A and B */ data test; do a=1 to 2; do b=1 to 2; do i=1 to 25; y = rannor(1234579); output; end; end; end; run;

/* Fit full factorial ANOVA model */ proc mixed data=test; class a b; model y = a|b / s; contrast "Effect of A at B=1" a 1 -1 a*b 1 0 -1 0; contrast "Effect of A at B=2" a 1 -1 a*b 0 1 0 -1; contrast "Effect of A in B=1 and B=2 combined" a 1 -1 a*b .5 .5 -.5 -.5; run;

First of all, you will observe that the interaction effect has the same p-value in both the solution and Type 3 table. It is only the lower order terms (main effects of A and B) which have different p-values.

Now, the contrast labeled "Effect of A at B=2" yields exactly the same p-value as is reported in the solutions table. You will further observe that the contrast labeled "Effect of A in B=1 and B=2 combined" yields the same p-value as is reported in the Type 3 tests of fixed effects table. So, the test of the main effect of A reported in the Type 3 table is an average effect of factor A across all levels of B. The test of the parameter A reported in the solutions table is the effect of A within the reference level of factor B.

In your data, the effect of A reported in the solutions table is the effect of A within reference levels for variables B and C. The effect of A reported in the Type 3 table is the effect of A over all levels of B and C.

Now, I would note that none of the interactions is significant in your fitted model. Also, as pointed out above, all of the interaction terms have the same p-value in both tables. There is no ambiguity in the interpretation of the p-values for the interaction effects. I would drop the interaction effects from your model. Note that when you drop the interaction effects, you can construct a likelihood ratio test for the joint effect of all the interaction terms. If that likelihood ratio test is nonsignificant, then a simple main effects model is better in these data. If the likelihood ratio test is significant, the you have more work to do to determine which interactions are informative about the data.

HTH,

Dale

--- anne olean <annekolean@yahoo.com> wrote:

> Sorry, here they are. a, b and c are two-level dummy > variables (0/1). week is 0-11. in the output you will > see that in the type 3 table "b" and "week" are > significant but not so in the "solutions for fixed > effects" table. thanks, ako > > > proc mixed data=dataUV; > class a b c id ; > model y=a b c week > week*a week*b week*c > a*b a*c b*c/ddfm=bw outpred=mypred solution; > random int week/subject = id (a b c) type=un g; > run; > > > Type 3 Tests of Fixed Effects > > Num Den > Effect DF DF F Value Pr > F > > a 1 88 0.00 0.9523 > b 1 88 8.85 0.0038*** > c 1 88 0.00 0.9800 > week 1 689 6.85 0.0090*** > week*a 1 689 0.22 0.6413 > week*b 1 689 1.40 0.2377 > week*c 1 689 0.03 0.8656 > a*b 1 88 2.78 0.0991 > a*c 1 88 1.87 0.1746 > b*c 1 88 0.13 0.7156 > > > > Solution for Fixed Effects > > Standard > Effect a c b Estimate Error > DF t Value Pr > |t| > > Intercept 0.5312 0.07336 > 88 7.24 <.0001 > > a 1 0.02076 0.09532 > 88 0.22 0.8281 > > b 0 -0.07043 0.09907 > 88 -0.71 0.4790 > > c 1 -0.05454 0.09797 > 88 -0.56 0.5792 > > week -0.00592 0.006742 > 689 -0.88 0.3803 > > week*a 1 0.003155 0.006769 > 689 0.47 0.6413 > > week*b 0 -0.00804 0.006802 > 689 -1.18 0.2377 > > week*c 1 -0.00115 0.006788 > 689 -0.17 0.8656 > > a*b 1 0 -0.1875 0.1124 > 88 -1.67 0.0991 > > a*c 1 1 0.1534 0.1121 > 88 1.37 0.1746 > > b*c 1 0 -0.04118 0.1127 > 88 -0.37 0.7156 > > > > --- Dale McLerran <stringplayer_2@YAHOO.COM> wrote: > > > Anne, > > > > Please show your code as well as the solution table > > and Type 3 > > table. It is really difficult to provide informed > > comment > > without seeing your code and results. > > > > Dale > > > > > > --- anne olean <annekolean@YAHOO.COM> wrote: > > > > > Hi, I fitted a model using proc mixed with fixed > > and > > > random effects and requested solutions for > > regression > > > coefficients with the "solution" command in the > > model > > > statement. I have found that in the "Type 3 fixed > > > effects" some predictors come up significant but > > not > > > in the "solution for fixed effects" obtained via > > > "solution" command. Is this an indication of a > > problem > > > in the way I specified the model? I have observed > > this > > > often, and sometimes it's the other way around, > > > "solution" produces significant effects but "type > > 3" > > > doesn't. > > > > > > any advice would be greatly appreciated. thanks, > > ako > > > > > > > > > > > > > > > > > > __________________________________ > > > Do you Yahoo!? > > > New and Improved Yahoo! Mail - Send 10MB messages! > > > http://promotions.yahoo.com/new_mail > > > > > > > > > ===== > > --------------------------------------- > > Dale McLerran > > Fred Hutchinson Cancer Research Center > > mailto: dmclerra@fhcrc.org > > Ph: (206) 667-2926 > > Fax: (206) 667-5977 > > --------------------------------------- > > > > > > > > _______________________________ > > Do you Yahoo!? > > Win 1 of 4,000 free domain names from Yahoo! Enter > > now. > > http://promotions.yahoo.com/goldrush > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >

===== --------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra@fhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 ---------------------------------------

__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail


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