glmmML(formula, family = binomial, data, cluster, weights,
cluster.weights, subset, na.action,
offset, prior = c("gaussian", "logistic", "cauchy", "gamma"),
start.coef = NULL, start.sigma = NULL, fix.sigma = FALSE, x = FALSE,
control = list(epsilon = 1e-08, maxit = 200, trace = FALSE),
method = c("Laplace", "ghq"), n.points = 8, boot = 0)
binomial
and
poisson
. The binomial family allows for the logit
and
cloglog
links.glm.control
for details.method
is set to "Laplace", this parameter
is ignored.boot = 0
). If you want to say yes, enter a
positive integer here. It should be equal to the number of bootstrap
samples you want to draw. A recomended absolute minimum value is
boot = 2000
.sigma
)deviance
gives a test statistic for
the null hypothesis of no clustering. Its asymptotic distribution is
a symmetric mixture a constant at zero and a chi-squared distribution
with one df. The printed p-value is based on this.For the binomial families, the response can be a two-column matrix, see the help page for glm for details.
glmmboot
, glm
, optim
,
lmer
in the package lme4
and
glmmPQL
in the package MASS
.id <- factor(rep(1:20, rep(5, 20)))
y <- rbinom(100, prob = rep(runif(20), rep(5, 20)), size = 1)
x <- rnorm(100)
dat <- data.frame(y = y, x = x, id = id)
glmmML(y ~ x, data = dat, cluster = id)
Run the code above in your browser using DataLab