Torbjørn Håkan Ergon <t.h.ergon <at> ibv.uio.no> writes:

> 
> Dear list,
> 
> I'm trying to supply a summary function to confint.merMod(method="boot")
>  {lme4} but get persistent
> errors. The following example generates the errors:
> 
> > fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
> > test = function(fit) fixef(fit)[1]
> > test(fm1)
> (Intercept) 
>    251.4051 
> > confint(fm1, method="boot", FUN=test)
> Computing bootstrap confidence intervals ...
> Error in set.seed(seed) : supplied seed is not a valid integer
> > confint(fm1, method="boot", FUN=test, seed=100)
> Computing bootstrap confidence intervals ...
> Error in if (use.u) NULL else ~0 : 
>   argument is not interpretable as logical
> > confint(fm1, method="boot", FUN=test, seed=100, use.u = FALSE)
> Computing bootstrap confidence intervals ...
> Error in match.arg(type) : 'arg' must be NULL or a character vector
> > confint(fm1, method="boot", FUN=test, seed=100, use.u = TRUE)
> Computing bootstrap confidence intervals ...
> Error in match.arg(type) : 'arg' must be NULL or a character vector
> >
> 
> Any help/hints/ideas?
> 

 It turns out (not documented!) that you can't use confint.merMod
(at present) with user-specified functions -- when it says ...
are arguments that can be passed through to bootMer, it actually
means "other than FUN or nsim" ...

This should be a reasonable workaround 

bb <- bootMer(fm1, nsim=100, FUN=test)
library("boot")
boot.ci(bb,type="perc")

Future lme4-related questions should probably go to 
r-sig-mixed-mod...@r-project.org ...

Future lme4-related questions should probably go 
> Cheers,
> 
> Torbjørn
> 
> 


______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to