[R-sig-ME] Calculating CI's for multiple fixed effects

Gus Jespersen jesper at u.washington.edu
Fri Jul 6 23:38:23 CEST 2012


Greetings,
My questions are related to producing confidence intervals via
mcmcsamp and HPDinterval.  As you can see in the output below, my
model has several fixed effect parameters.  Of interest to me are each
of the "Treatment" vs. "Control" comparisons for each "site"(in each
fixed effect parameter name, these are specified by the text
immediately following "sitett").  As I understand it, if I want to
produce a CI for each "Treatment" parameter from the anova output, I
need to simply subtract the Control estimate from the Treatment
estimate for each site. The SE's are a little more complicated, but
that's not important here.  This is easy enough.  However, if I want
to use the mcmcsamp+HPDinterval combo to produce my CI's, I unsure how
to proceed.  The HPDinterval output below lists upper and lower bounds
for each fixed effect parameter, but I have no idea how to get the
"Treatment" vs. "Control" comparison for each site when working with
just the upper and lower bounds of the CI.  Any advice on how to
proceed here would be much appreciated.

Thanks,
Gus

#Models
Mod.NO3.1.1<-lmer(LogNO3Nyearone ~ 1 + sitett +(1 | pr), data=data.file.final)
Mod.NO3.1.2<-lmer(LogNO3Nyearone~ 1 +(1 | pr), data=data.file.final)

#Output:
anova(Mod.NO3.1.1,Mod.NO3.1.2)
Mod.NO3.1.1
Mod.NO3.1.1.mcmc<-mcmcsamp(Mod.NO3.1.1, n=1000)
HPDinterval(Mod.NO3.1.1.mcmc, prob=.95)

***********************************************************************
Data: data.file.final
Models:
Mod.NO3.1.2: LogNO3Nyearone ~ 1 + (1 | pr)
Mod.NO3.1.1: LogNO3Nyearone ~ 1 + sitett + (1 | pr)
            Df    AIC    BIC  logLik  Chisq Chi Df Pr(>Chisq)
Mod.NO3.1.2  3 99.830 108.59 -46.915
Mod.NO3.1.1 14 74.329 115.21 -23.165 47.501     11  1.752e-06 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Linear mixed model fit by REML
Formula: LogNO3Nyearone ~ 1 + sitett + (1 | pr)
   Data: data.file.final
   AIC   BIC logLik deviance REMLdev
 110.9 151.8 -41.46    46.33   82.92
Random effects:
 Groups   Name        Variance  Std.Dev.
 pr       (Intercept) 0.0029239 0.054073
 Residual             0.0871127 0.295149
Number of obs: 137, groups: pr, 72

Fixed effects:
                             Estimate Std. Error t value
(Intercept)                   1.24011    0.09047  13.708
sitettLepAddition Treatment  -0.03859    0.12329  -0.313
sitettMossAddition Control    0.07747    0.13110   0.591
sitettMossAddition Treatment  0.13940    0.12794   1.090
sitettMossRemoval Control    -0.36994    0.12525  -2.954
sitettMossRemoval Treatment  -0.25789    0.12525  -2.059
sitettSaddle Control         -0.33039    0.12525  -2.638
sitettSaddle Treatment       -0.46379    0.12794  -3.625
sitettToeAdditions Control   -0.17356    0.12525  -1.386
sitettToeAdditions Treatment -0.33236    0.13110  -2.535
sitettToeRemoval Control     -0.38744    0.12525  -3.093
sitettToeRemoval Treatment   -0.44006    0.12525  -3.513

Correlation of Fixed Effects:
            (Intr) sttLAT sttMAC sttMAT sttMRC sttMRT stttSC stttST
sttTAC sttTAT sttTRC
stttLpAddtT -0.712
stttMssAddC -0.690  0.491
stttMssAddT -0.707  0.503  0.502
stttMssRmvC -0.722  0.514  0.498  0.511
stttMssRmvT -0.722  0.514  0.498  0.511  0.537
stttSddlCnt -0.722  0.514  0.498  0.511  0.522  0.522
stttSddlTrt -0.707  0.503  0.488  0.500  0.511  0.511  0.526
stttTAddtnC -0.722  0.514  0.498  0.511  0.522  0.522  0.522  0.511
stttTAddtnT -0.690  0.491  0.476  0.488  0.498  0.498  0.498  0.488
0.513
stttTRmvlCn -0.722  0.514  0.498  0.511  0.522  0.522  0.522  0.511
0.522  0.498
stttTRmvlTr -0.722  0.514  0.498  0.511  0.522  0.522  0.522  0.511
0.522  0.498  0.537

$fixef
                                  lower       upper
(Intercept)                   1.0680512  1.44056743
sitettLepAddition Treatment  -0.2625679  0.22422795
sitettMossAddition Control   -0.1969100  0.32171278
sitettMossAddition Treatment -0.1281604  0.38479353
sitettMossRemoval Control    -0.6237913 -0.12131695
sitettMossRemoval Treatment  -0.5529020 -0.03247241
sitettSaddle Control         -0.5796939 -0.07807756
sitettSaddle Treatment       -0.7031393 -0.20777619
sitettToeAdditions Control   -0.4209195  0.07304341
sitettToeAdditions Treatment -0.5943879 -0.05751119
sitettToeRemoval Control     -0.6358857 -0.14028991
sitettToeRemoval Treatment   -0.7043854 -0.22088608
attr(,"Probability")
[1] 0.95

$ST
     lower     upper
[1,]     0 0.2142559
attr(,"Probability")
[1] 0.95

$sigma
         lower     upper
[1,] 0.2643662 0.3430281
attr(,"Probability")
[1] 0.95

-- 
R. Gus Jespersen
PhD Candidate
College of Forest Resources
University of Washington
Box 352100
Seattle, WA 98195-2100
(206) 543-5777
jesper at u.washington.edu



More information about the R-sig-mixed-models mailing list