SAS中文论坛

标题: 请教关于MIXED的问题 [打印本页]

作者: shiyiming    时间: 2010-9-9 15:32
标题: 请教关于MIXED的问题
我要分析一个数据,用ANOVA,时间作为fixed effect,个体作为random effect,要分析个体的CV和它的双侧80%CI,应该怎么写啊。。。。

请教~~~~~

泪谢!!!!
作者: shiyiming    时间: 2010-9-9 20:29
标题: Re: 请教关于MIXED的问题
又上当了,猪头做不到。
CI似乎可以在RANDOM statement里加选项得到
<!-- m --><a class="postlink" href="http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_mixed_sect019.htm">http://support.sas.com/documentation/cd ... ect019.htm</a><!-- m -->
CV我还以为是PROC GLM输出的Coefficient of Variation呢。
作者: shiyiming    时间: 2010-9-10 13:05
标题: Re: 请教关于MIXED的问题
[quote=&quot;死猪头&quot;:2ng73pi3]PROC GLM 或 MIXED都行。
比如把下面的例子加一个LSMEANS statement。http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_glm_sect054.htm
瞎XX说的,like always。[/quote:2ng73pi3]


谢谢!!我前面没说太清楚,是要计算个体内的CV和80% CI,就是within subject,要求用proc mixed,有什么选项能用吗?
作者: shiyiming    时间: 2010-9-10 20:27
标题: Re: 请教关于MIXED的问题
个体的CV ?
什么是CV?CV不是简历吗?
作者: shiyiming    时间: 2010-9-13 15:24
标题: Re: 请教关于MIXED的问题
to jingju11
CV 是 Coefficient of Variation,变异系数。。。。
作者: shiyiming    时间: 2010-9-14 04:56
标题: Re: 请教关于MIXED的问题
以SAS某数据pr为例:

[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&#46;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 &gt; 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', &amp;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
万分感谢,先研究下,不懂再回来问。。。




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2