|
|||
|
No, that is not correct. Please re-read my previous post
on computing an R^2 when using the MIXED procedure (http://listserv.uga.edu/cgi-bin/wa?A...sas-l&P=R23346). That post states that you must first fit the unconstrained model. /* 3-level multilevel conditional model */ proc mixed data=tmp covtest cl method=reml; class A B; model log_exp=var1 var 2 var3 / ddfm=SATTERTH solution; random int / subject=A; random int / subject=A*B; run; When you fit that model, you will get a table of "Covariance Parameter Estimates". That table should have three entries. Let's say that those values (in the order presented in the "Covariance Parameter Estimates" table were 0.87, 0.26, and 8.74. Now, refit your model without the predictor variables, and with the first two entries held fixed at the values 0.87 and 0.26. You could also initialize the residual variance to be 8.74. However, you do not want to hold the residual variance fixed at 8.74. Thus, for our hypothetical example, we would specify a second invocation of PROC MIXED as: /* 3-level multilevel conditional model */ proc mixed data=tmp covtest cl method=reml; class A B; model log_exp= / ddfm=SATTERTH solution; random int / subject=A; random int / subject=A*B; parms (0.87) (0.26) (8.74) / hold=1,2; run; Now, the "Covariance Parameter Estimates" table from this second invocation of PROC MIXED will have the same first two values: 0.87 and 0.26. However, the residual variance should differ. Let's say that the new estimate of the residual variance was 10.0. Then an estimate of the amount of variance explained by the three predictor variables would be (10.0 - 8.74)/10.0 = 0.126. HTH, Dale --------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra@NO_SPAMfhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 --------------------------------------- --- On Fri, 11/27/09, Ching <kcwong5@GMAIL.COM> wrote: > From: Ching <kcwong5@GMAIL.COM> > Subject: proc mixed: variance explained > To: SAS-L@LISTSERV.UGA.EDU > Date: Friday, November 27, 2009, 2:11 AM > Hi everyone. > > Please advice if I'm not doing it right. > I'm trying to find out how much variability of log_exp is > explained > when I fitted binary coded 0/1 var1-var3. > I first summed up all the 'Estimates' from the Covariance > section > produced from below 1st model(V1) and I did the same for > the below 2nd > model(V2). I calculated the percentage of variability > explained in > log_exp after controlling for var1-var3 as > (V1-V2)/(V1)*100. Am I > doing and intepreting it correctly? Many thanks in advance. > Have a > lovely weekend. > > > /* 3-level multilevel un-conditional model */ > proc mixed data=tmp covtest cl method=reml; > class A B; > model log_exp= / ddfm=SATTERTH solution; > random int / subject=A; > random int / subject=A*B; > run; > > /* 3-level multilevel conditional model */ > proc mixed data=tmp covtest cl method=reml; > class A B; > model log_exp=var1 var 2 var3 / ddfm=SATTERTH > solution; > random int / subject=A; > random int / subject=A*B; > run; > |
|
|
||||
|
||||
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: R square in proc mixed? | Dale McLerran | Newsgroup comp.soft-sys.sas | 0 | 11-19-2009 06:36 PM |
| Re: How does PROC MIXED work | Robin R High | Newsgroup comp.soft-sys.sas | 0 | 04-24-2009 01:55 PM |
| Re: PROC MIXED and PROC GLM | David L Cassell | Newsgroup comp.soft-sys.sas | 0 | 06-01-2006 10:09 PM |
| Re: % of Variance in Proc Factor... | Swank, Paul R | Newsgroup comp.soft-sys.sas | 0 | 11-15-2005 01:41 PM |
| Re: Sphericity test in PROC MIXED | David L. Cassell | Newsgroup comp.soft-sys.sas | 0 | 05-09-2005 09:24 PM |