Following grafts are taken from this article . I'm newbie to bootstrap and trying to implement the parametric, semiparametric and nonparametric bootstrapping bootstrapping for linear mixed model with R boot
package.
R Code
Here is my R
code:
library(SASmixed)
library(lme4)
library(boot)
fm1Cult <- lmer(drywt ~ Inoc + Cult + (1|Block) + (1|Cult), data=Cultivation)
fixef(fm1Cult)
boot.fn <- function(data, indices){
data <- data[indices, ]
mod <- lmer(drywt ~ Inoc + Cult + (1|Block) + (1|Cult), data=data)
fixef(mod)
}
set.seed(12345)
Out <- boot(data=Cultivation, statistic=boot.fn, R=99)
Out
Questions
- How to do parametric, semiparametric and nonparametric bootstrapping for mixed models with
boot
package? - I guess I'm doing nonparametric bootstrapping for mixed model in my code.
I found these slides but could not get the R package merBoot
. Any idea where I can get this package. Any help will be highly appreciated. Thanks in advance for your help and time.