[R-sig-ME] Problem with bootMer and models with offset
Ben Bolker
bbolker at gmail.com
Tue Oct 14 04:16:22 CEST 2014
Martin Hecht <martin.hecht at ...> writes:
>
>
> Hi,
>
> I am using the latest version of R (3.1.1) and lme4 (1.1-7) .
>
> I'm getting some weird implausible bootstrap results from bootMer for a
> model with an offset (models without offset work fine).
>
> I've attached an Rdata file with the returned object from lmer (lmerObj)
> and the returned object from bootMer (booted)
Unfortunately, Rdata/RData files get stripped by the mailing list
software (there's a short list of attachments that get allowed --
I'm not sure how to find it -- probably includes txt and CSV files
but not much else).
> Any help would be appreciated very much.
>
> the syntax is:
>
> booted <- bootMer ( x = lmerObj , FUN =
> function(fit){return(c(fixef(fit),getME(fit,'theta')))} , nsim = 100 ,
> seed = 65835 , verbose = TRUE )
>
> > booted$t0[1]
> (Intercept)
> 2.606621
>
> > mean(booted$t[,1])
> [1] -78.21035
>
> > boot::boot.ci ( booted , conf = 0.95 , type = "basic" , index = 1 )
> BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
> Based on 100 bootstrap replicates
>
> CALL :
> boot::boot.ci(boot.out = booted, conf = 0.95, type = "basic",
> index = 1)
>
> Intervals :
> Level Basic
> 95% (69.864, 95.425 )
> Calculations and Intervals on Original Scale
> Some basic intervals may be unstable
This does indeed seem weird.
Does plot(booted,1) help at all?
I wonder if a workaround for now is to add the offset manually;
that should be perfectly feasible (if not quite as convenient)
for a linear mixed model -- it's only really *necessary* for
a GLMM ...
More information about the R-sig-mixed-models
mailing list