comp.soft-sys.sas - The SAS statistics package.
Hello List, My questin regards calculating an r-squared value for a mixed model. From the archives of this list (14 June 2002, subject: Re: Proc Mixed) and the literature (Feng et al. 2001. Annu. Rev. Public Health 22:167-187), my understanding is that to get an estimate of the fixed variation accounted for by a mixed model, I must hold the random components constant using a parms statement. The code for the model I am fitting is: proc mixed data=mydata; class SUBJ TREAT; model conv=temp TREAT / s cl; random intercept / subject=SUBJ; repeated / subject=SUBJ type=sp(pow)(hours); run; From this model, I get the covariance parameter estimates: intercept=0.1292 sp(pow)=-0.7550 residual=0.5330 and then fit the null model with the covariance parameters set: proc mixed data=mydata; class SUBJ TREAT; model conv= / s cl; random intercept / subject=SUBJ; repeated / subject=SUBJ type=sp(pow)(hours); parms (0.1292) (-0.7550) (5330) / hold=1,2; run; And then would calculate r-squared as: (residual of null model)-(residual of the full model)/(residual of the null model) This should give me the proportion of the fixed effects variability accounted for by treatment and temperature in the full model. Is this correct? Also, when running this code, the parameter value for the random intercept does not remain constant, any thoughts on this? Thanks for your input. Have a good day, KA --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software
Hi all. How can I obtain R square in proc mixed or maybe something similar such that I can use in order to know how much variability is explained by the mixed model? Have a good day. Many thanks in advance.
Dear List: I am using proc mi, proc mixed, and proc mianalyze to analyze my data considering the uncertainty of the missingness. After getting the multiple imputed data sets I started the null model using the proc mixed. I got the results of the null model. But I could not run the proc mianalyze on the random effects of the null model to synthesize the results. It keeps saying the var is not in the parm dataset. I am wondering if someone in this list can shed some lights on this. I think I probably missed some syntax but could not figure out. The following is my sas codes: /*null model*/ proc mixed data=miout1 noclprint covtest; class d1; model v1=/solution; random intercept/s sub=d1; by _imputation_; ods output solutionF=fixedeffects Covparms=randomeffect; run; /*synthesize the fixedeffects for the null models*/ PROC MIAnalyze PARMS=fixedeffects; modeleffects intercept; RUN; /*synthesize the randomeffects for the null models*/ PROC MIAnalyze parms=randomeffect; modeleffects covparm; RUN; Thanks very much in advance, Aihua