[R-sig-ME] bootstrapping random effects using confint() in lme4
Jonathan Miller
jwmille7 at ncsu.edu
Fri Oct 14 20:08:37 CEST 2016
Dr. Bolker,
I am sorry for what I imagine is a pretty straightforward question. My
name is Jonathan Miller and I am a Phd student at NCSU in Civil
Engineering. I have tried to look through online resources for a post on
this, but have not been successful in determining what I need to do.
I have been using lme4 to run a logisitic mixed model and it has worked
very well. Recently, though, I was interested in determining the
uncertainty in the random effects in my model. It contains three levels of
random effects, estuaries(32), states(5) and programs(7). I think the
function confint() is what I need to do, but I am having trouble getting
the outputs for the individual random effects(i.e. estuaries, states,
programs).
My code is below:
m3=glmer(Pres~ Temp_mean + Sal_mean + salsq + NEAR_DIST
+ (1|STATE) + (1 | UNIQUEID) + (1|program),
data=bighead, na.action = na.exclude, nAGQ=0,
family=binomial(link="logit"))
confint.merMod(m3,method="boot",nsim=100)
My output just gives me a summary of each fixed effect and each random
effect group. I think there must be a relatively simple way to get the
output of the bootstrapping for each individual random effect. It seems
the answer lies in FUN, but I haven't gotten it to work for me yet.
2.5 % 97.5 %
sd_(Intercept)|UNIQUEID 4.720458e-01 0.98029041
sd_(Intercept)|program 3.168555e-01 1.26836628
sd_(Intercept)|STATE 3.019507e-07 1.30279935
(Intercept) -6.088106e+00 -3.81230673
Temp_mean -6.882682e-02 -0.05817473
Sal_mean 1.696714e-01 0.20005360
salsq -2.253061e+00 -1.89913153
NEAR_DIST 3.895820e-01 0.50612062
Any help would be greatly appreciated.
Thank you,
Jonathan Miller
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list