| glmmML {glmmML} | R Documentation |
Fits GLMs with random intercept by Maximum Likelihood and numerical integration via Gauss-Hermite quadrature.
glmmML(formula, family = binomial, data, cluster, subset, na.action, offset, start.coef = NULL, start.sigma = NULL, control = glm.control(epsilon = 1e-08, maxit = 100, trace = FALSE), n.points = 16)
formula |
a symbolic description of the model to be fit. The details of model specification are given below. |
family |
Currently, the only valid values are binomial and
poisson. The binomial family allows for the logit and
cloglog links, but can only be represented as binary data. |
data |
an optional data frame containing the variables in the model. By default the variables are taken from `environment(formula)', typically the environment from which `glmmML' is called. |
cluster |
Factor indicating which items are correlated. |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
See glm. |
start.coef |
starting values for the parameters in the linear predictor. Defaults to zero. |
start.sigma |
starting value for the mixing standard deviation. Defaults to 0.5. |
offset |
this can be used to specify an a priori known component to be included in the linear predictor during fitting. |
control |
Controls the convergence criteria. See
glm.control for details. |
n.points |
Number of points in the Gauss-Hermite quadrature. If n.points == 1, an ordinary glm is fitted. |
After the 'vmmin' function has converged, an ordinary Newton-Raphson procedure finishes the maximization. As a by-product, the variance-covariance is estimated.
The return value is a list, an object of class 'glmmML'.
This is a very preliminary version. The optimization may fail with
the default value of start.sigma. In that case, try different
start values for sigma.
Göran Broström
Broström (2003). Generalized linear models with random intercepts. http://www.stat.umu.se/forskning/glmmML.pdf
glmmboot, optim,
glmm in Lindsey's
repeated package, GLMM in lme4and
glmmPQL in 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)