1
I am doubtful to generate a confidence interval that I have been asked to when it is a GLMM
Normally if it were not binomial would do for example like this:
library(boot)
library(lme4)
library(dplyr)
dat <- data.frame(x = runif(100, -2,2),ind = gl(n = 10, k = 10))
dat$y <- 1 + 2 * dat$x + rnorm(10, 0, 1.2)[dat$ind] + rnorm(100, 0, 0.5)
m <- lmer(y ~ x + (1|ind), dat)
b_par <- bootMer(x = m, FUN = fixef, nsim = 200)
boot.ci(b_par, type = "perc", index = 1)
But when y is binomial, I don’t know how to generate the dat$y mentioned above.
Thank you
Hello Cleber, remove the tag
bootstrap-3
, because it’s a programming language. To reproduce the error, provide the database, or at least a database with the same behavior as your.– Guilherme Parreira