[code:1mq607q4]proc mixed data=PR method=ML asycov ;
model y = age/ s ddfm=bw ;
random intercept / subject=person;
ods output SolutionF=_SF_ AsyCov=_AC_ CovParms=_CP_;
run;
data _CP_1_(rename = (estimate = CPb)) _CP_2_( rename = (estimate = CPw));
set _CP_;
if upcase(covparm) in ('INTERCEPT') then output _CP_1_;
if upcase(covparm) in ('RESIDUAL') then output _CP_2_;
keep estimate;
run;
data _AC_1_( rename = (CovP1=varCPb CovP2 =COVbw)) _AC_2_(keep = CovP2 rename = (CovP2 = varCPw));
set _AC_;
if upcase(covparm) in ('INTERCEPT') then output _AC_1_;
if upcase(covparm) in ('RESIDUAL') then output _AC_2_;
keep CovP1 CovP2;
run;
%let alpha = 0.90; ***corresponding to 80% sig;
data OutPut;
keep lclCV CV uclCV Mean sdW;
merge _CP_1_ _CP_2_ _AC_1_ _AC_2_ _SF_(where = (upcase(effect) eq 'INTERCEPT'));
Mean = estimate; seMean = StdErr; varMean = StdErr**2;
if CPw > 0 then sdW=sqrt(CPw);
CV = sdW/Mean;
_sign = sign(CV);
VarCov = varCPw/(4*Mean*Mean*CPw) + (CPw/(Mean**4))*varMean;
logCV = log(abs(CV));
varLogCV = (1/CV**2)*VarCov;
_QT = quantile('normal', &alpha);
LOGlclCV = logCV-_sign*_QT*sqrt(varLogCV); LOGuclCV = logCV+_sign*_QT*sqrt(varLogCV);
lclCV=_sign*exp(LOGlclCV); uclCV = _sign*exp(LOGuclCV);
label
Mean='Mean'
sdW='Within-subj std dev'
CV='within-subj coefficient of variation'
lclCV='lower 95% CL for within-subj CV'
uclCV='upper 95% CL for within-subj CV'
;
run;[/code:1mq607q4]
****refer to ICC macro;
JingJu作者: shiyiming 时间: 2010-9-14 08:50 标题: Re: 请教关于MIXED的问题 to jingju11
万分感谢,先研究下,不懂再回来问。。。