Hello R users
I'm using MuMIn but for some reason I'm not getting the adjusted
confidence
interval and uncoditional SE whe I use model.avg().
I took into consideration the steps provided by Grueber et al (2011)
Multimodel inference in ecology and evolution: challenges and solutions in
JEB.
I created a global model to see if malaria prevalence (binomial
distribution) is related to any life history traits of 14 different birds
species, while controling for Family and genus in a GLMM:
global.model.Para<-lmer(cbind(Parahaemoproteus,FailPh)~factor(SS)+factor(NT)+NH+W+IT+factor(MS)+(1|Family/Genus),family=binomial,data=malaria)
I than standardize the input variables using the function standardize form
the arm package:
stdz.model.Para<-standardize(global.model.Para,standardize.y=FALSE)
But I get this message:
Warning messages lost:
In is.na(thedata):
is.na() aplied to an object different from list or vector of type
"Null"
summary(stdz.model.Para)
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(Parahaemoproteus, FailPh) ~ factor(SS) + factor(NT) + z.NH +
z.W + z.IT + factor(MS) + (1 | Family/Genus)
Data: malaria
AIC BIC logLik deviance
45.89 51.64 -13.95 27.89
Random effects:
Groups Name Variance Std.Dev.
Genus:Family (Intercept) 1.4262 1.1942
Family (Intercept) 0.0000 0.0000
Number of obs: 14, groups: Genus:Family, 12; Family, 5
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.6494 1.1791 -3.943 8.04e-05 ***
factor(SS)1 3.7793 2.0709 1.825 0.068 .
factor(NT)1 1.8975 1.2793 1.483 0.138
z.NH 0.4902 2.1099 0.232 0.816
z.W -1.6237 1.5957 -1.018 0.309
z.IT -0.7656 1.9598 -0.391 0.696
factor(MS)1 -2.0603 1.3907 -1.481 0.138
---
Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Correlation of Fixed Effects:
(Intr) f(SS)1 f(NT)1 z.NH z.W z.IT
factor(SS)1 -0.202
factor(NT)1 -0.599 0.090
z.NH 0.058 -0.790 -0.178
z.W 0.232 -0.632 0.039 0.503
z.IT 0.051 0.569 0.323 -0.851 -0.339
factor(MS)1 -0.176 -0.632 -0.319 0.538 0.165 -0.567
I then proceed to use the dredge fucntion:
model.set.Para<-dredge(stdz.model.Para)
model.set.Para
Global model: glmer(formula = cbind(Parahaemoproteus, FailPh) ~ factor(SS) +
factor(NT) + z.NH + z.W + z.IT + factor(MS) + (1 | Family/Genus),
data = malaria, family = "binomial")
---
Model selection table
(Int) fct(MS) fct(NT) fct(SS) z.I z.N z.W k Dev. AIC
AICc delta weight
4 -5.231 + 4 34.64 42.64
47.08 0.0000 0.290
9 -4.750 + + 5 30.00 40.00
47.50 0.4142 0.236
.
.
.
Random terms: 1 | Family/Genus
I then select the models with delta value up to 7:
top.models.Para<-get.models(model.set.Para,subset=delta<=7)
top.models
But when I do the model average I do not seem to be getting the variance or
Uncoditional SE and I'm guessing that the Confidence interval are no
conditional either:
model.avg(top.models.Para,method="NA")
Model summary:
Deviance AICc Delta Weight
3 34.64 47.08 0.00 0.30
1+3 30.00 47.50 0.41 0.25
4+5 31.49 48.99 1.90 0.12
3+5 32.29 49.79 2.70 0.08
3+6 33.02 50.52 3.44 0.05
5 38.41 50.86 3.77 0.05
3+4 33.77 51.27 4.19 0.04
1+3+5 27.85 51.85 4.77 0.03
3+4+5 27.86 51.86 4.78 0.03
1+3+4 28.58 52.58 5.49 0.02
1+5 35.33 52.83 5.75 0.02
1+3+6 29.34 53.34 6.26 0.01
1+2+3 30.02 54.02 6.93 0.01
Variables:
1 2 3 4 5 6
factor(MS) factor(NT) factor(SS) z.IT z.NH z.W
Averaged model parameters:
Coefficient SE Lower CI Upper CI
(Intercept) -4.75 1.410 -7.510 -1.9900
factor(MS)1 -1.54 0.809 -3.120 0.0471
factor(NT)1 2.28 1.310 -0.286 4.8500
factor(SS)1 3.30 0.968 1.400 5.2000
z.IT -2.79 2.230 -7.160 1.5800
z.NH 2.28 1.660 -0.968 5.5300
z.W -1.74 1.490 -4.650 1.1800
Confidence intervals are unadjusted
Relative variable importance:
factor(SS) factor(MS) z.NH z.IT z.W factor(NT)
0.82 0.33 0.32 0.20 0.07 0.01
Does anyone know what I might be doing wrong?
thanks for the help
Marcos
--
View this message in context:
http://r.789695.n4.nabble.com/MuMIn-Problem-getting-adjusted-Confidence-intervals-tp3776500p3776500.html
Sent from the R help mailing list archive at Nabble.com.
Kamil BartoĊ
2011-Sep-06 13:44 UTC
[R] MuMIn Problem getting adjusted Confidence intervals
Hi Marcos, The 'adjusted CI' (based on the 'adjusted se estimator' as in section 4.3.3 of Burnham & Anderson 2002) cannot be calculated for 'lmer' model because it does not give df's for the coefficients. kamil Dnia 2011-08-30 12:00, r-help-request at r-project.org pisze:> Message: 42 > Date: Mon, 29 Aug 2011 08:28:22 -0700 (PDT) > From: Marcos Lima<robalinho.lima at googlemail.com> > To:r-help at r-project.org > Subject: [R] MuMIn Problem getting adjusted Confidence intervals > Message-ID:<1314631702645-3776500.post at n4.nabble.com> > Content-Type: text/plain; charset=UTF-8 > > Hello R users > > I'm using MuMIn but for some reason I'm not getting the adjusted confidence > interval and uncoditional SE whe I use model.avg(). > > I took into consideration the steps provided by Grueber et al (2011) > Multimodel inference in ecology and evolution: challenges and solutions in > JEB. > > I created a global model to see if malaria prevalence (binomial > distribution) is related to any life history traits of 14 different birds > species, while controling for Family and genus in a GLMM: > > global.model.Para<-lmer(cbind(Parahaemoproteus,FailPh)~factor(SS)+factor(NT)+NH+W+IT+factor(MS)+(1|Family/Genus),family=binomial,data=malaria) > > I than standardize the input variables using the function standardize form > the arm package: > > stdz.model.Para<-standardize(global.model.Para,standardize.y=FALSE) > > But I get this message: > Warning messages lost: > In is.na(thedata): > is.na() aplied to an object different from list or vector of type "Null" > > I then proceed to use the dredge fucntion: > model.set.Para<-dredge(stdz.model.Para) > <...>> top.models.Para<-get.models(model.set.Para,subset=delta<=7) > top.models > > But when I do the model average I do not seem to be getting the variance or > Uncoditional SE and I'm guessing that the Confidence interval are no > conditional either: > > model.avg(top.models.Para,method="NA") > > <...> > > Averaged model parameters: > Coefficient SE Lower CI Upper CI > (Intercept) -4.75 1.410 -7.510 -1.9900 > factor(MS)1 -1.54 0.809 -3.120 0.0471 > factor(NT)1 2.28 1.310 -0.286 4.8500 > factor(SS)1 3.30 0.968 1.400 5.2000 > z.IT -2.79 2.230 -7.160 1.5800 > z.NH 2.28 1.660 -0.968 5.5300 > z.W -1.74 1.490 -4.650 1.1800 > Confidence intervals are unadjusted > > Relative variable importance: > factor(SS) factor(MS) z.NH z.IT z.W factor(NT) > 0.82 0.33 0.32 0.20 0.07 0.01 > > Does anyone know what I might be doing wrong? > > thanks for the help > > Marcos