2016-09-22 27 views
0

です。したがって、私は時間の経過とともに何か(MS_TOT)の変化を予測しようとしています。私は自分の時間変数(ExamStage:1,3,6、および12ヶ月)と私の薬物使用変数(acstatus、ファクタw 3レベル)を持っています。私は(他の変数を無視する)薬物使用は、私は私のlmerモデルに入れた時間ワットの相互作用、としてこの変更に影響を与えることを考える:あなたのようlmer時間変数の標準誤差はR

> summary(model6) 
Linear mixed model fit by REML 
t-tests use Satterthwaite approximations to degrees of freedom ['lmerMod'] 
Formula: MS_TOT ~ acstatus + ExamStage + acstatus * ExamStage + AIS.1 +  Level.1 + F + (ExamStage | id) 
    Data: E4 

REML criterion at convergence: 9776.9 

Scaled residuals: 
Min  1Q Median  3Q  Max 
-4.8608 -0.3650 -0.0252 0.4319 3.3463 

Random effects: 
Groups Name  Variance Std.Dev. Corr 
id  (Intercept) 150.346 12.2616  
      ExamStage  0.798 0.8933 0.09 
Residual    40.445 6.3597  
Number of obs: 1298, groups: id, 451 

Fixed effects: 
       Estimate Std. Error  df t value Pr(>|t|)  
(Intercept)   19.8213  1.4241 496.8000 13.919 < 2e-16 *** 
acstatus1   -1.5927  1.7913 417.6000 -0.889 0.37445  
acstatus2   -0.7399  1.8835 422.9000 -0.393 0.69465  
ExamStage    3.0816  0.2133 768.4000 14.446 < 2e-16 *** 
AIS.1B    4.1984  2.1890 436.6000 1.918 0.05578 . 
AIS.1C    16.3097  1.9329 440.3000 8.438 4.44e-16 *** 
AIS.1D    50.0334  1.5282 444.9000 32.740 < 2e-16 *** 
Level.1TL   24.6689  1.3098 443.1000 18.833 < 2e-16 *** 
F     -0.1745  0.0158 703.9000 -11.045 < 2e-16 *** 
acstatus1:ExamStage 0.2134  0.1891 211.0000 1.128 0.26053  
acstatus2:ExamStage 0.5455  0.2042 207.7000 2.671 0.00816 ** 
--- 
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Correlation of Fixed Effects: 
     (Intr) acstt1 acstt2 ExmStg AIS.1B AIS.1C AIS.1D Lv.1TL F   ac1:ES 
acstatus1 -0.215                
acstatus2 -0.157 0.176               
ExamStage -0.260 0.009 0.018             
AIS.1B  -0.382 -0.023 -0.008 0.005           
AIS.1C  -0.472 -0.035 -0.062 0.008 0.268         
AIS.1D  -0.648 0.014 -0.101 0.021 0.342 0.414        
Level.1TL -0.578 -0.009 -0.014 0.003 0.067 0.157 0.266      
F   0.226 0.041 0.028 -0.888 -0.005 -0.007 -0.019 -0.002    
acstts1:ExS 0.054 -0.194 -0.050 -0.178 -0.003 -0.002 -0.007 -0.002 -0.069  
acstts2:ExS 0.047 -0.050 -0.192 -0.168 0.000 0.000 -0.001 0.001 -0.060 0.254 

>model6<-lmer(MS_TOT~acstatus+ExamStage+acstatus*ExamStage+AIS.1+Level.1+F+ (ExamStage|id), E4) 

これは出力しましたacstatus2 *時間の相互作用は重要であった。だから、私はacstatus0と比較して、acstatus2はMS_TOTに対する(0.5455 * 12)= 5.88の大幅な増加を引き起こすと言いました。しかし、私の上司は、この数値の分散を測ることを望んでいます。私は推定値の標準誤差があります.btuは12ヶ月間の見積もりにどのようにして得られますか?

答えて

1

限界効果を計算する方法を調べることができます。例えば、How to calculate the standard error of the marginal effects in interactions?

あなたの声明

acstatus0に比べて、我々理由も、

が正確に正しくないMS_TOTする時間をかけて(0.5455 * 12)= 5.88より大きな増加を引き起こすacstatus2主な効果を含める必要がありますacstatus2acstatus2の限界効果は時間の関数なので、はMS_TOTの-0.7399 + 0.5455 * Xの増加と関連付けられていると言えるかもしれません。Xは月を表します。

限界効果の分散は、Var(a + bX)で、Var(a) + X^2 * Var(b) + 2 * X * Cov(a, b)(ここではXは12です)です。固定効果の分散共分散行列からこれらの量 - Var(a)Var(b)、およびCov(a, b) - を抽出することができます。 acstatus2の限界効果を得るには、

variables <- c("acstatus2", "acstatus2:ExamStage") 
vcv <- vcov(model6)[variables, variables] 
sqrt(vcv[1, 1] + 12^2 * vcv[2, 2] + 2 * 12 * vcv[1, 2]) 
+0

お返事ありがとうございました!あなたが正しいのであれば、私はacstatus2の主な効果は含んでいませんでした。なぜなら、私は時間相互作用の効果と、その12ヶ月間の標準誤差にしか興味がないと指定していたはずです。私はあなたの答えも同様にカバーしていると確信していますが、おそらくこのばらつきを計算する方法を説明できますか? – fwarner

+0

'Var(12 * b)'が何であるかを尋ねるなら、答えは '12^2 * Var(b)'です。標準的なエラー条件では、s.e.を掛け合わせるだけです。 12で。 –

関連する問題