Learn R Programming

glmmML (version 0.10)

glmmML.fit: Generalized Linear Model with random intercept

Description

This function is called by glmmML, but it can also be called directly by the user.

Usage

glmmML.fit(X, Y, start.coef = NULL, start.sigma = NULL, mixed = FALSE, cluster = NULL, offset = rep(0, nobs), family = binomial(), n.points = 16, control = glm.control(), method, intercept = TRUE)

Arguments

X
Design matrix of covariates
Y
Response vector
start.coef
Starting values for the coefficients.
start.sigma
Starting value for the mixing standard deviation.
mixed
Logical. If FALSE, an ordinary glm is fitted.
cluster
The clustring variable.
offset
The offset in the model.
family
Family of distributions. Defaults to binomial with logit link. Other possibilities are binomial with cloglog link and poisson with log link.
n.points
Number of points in the Gauss-hermite quadrature.
control
Control of the iterations. See glm.control
method
Which optimizer? Only choice is "vmmin".
intercept
Logical. If TRUE, an intercept is fitted.

Value

  • A list. For details, see the code.

Details

"vmmin" is followed by some Newton-Raphson steps, until convergence. As a by-product we get the estimated variance-covariance matrix.

References

Brostr�m (2003)

See Also

glmmML, glmmPQL, and glmm

Examples

Run this code
x <- cbind(rep(1, 14), rnorm(14))
y <- rbinom(14, prob = 0.5, size = 1)
id <- rep(1:7, 2)

glmmML.fit(x, y, cluster = id, mixed = TRUE, method = 1)

Run the code above in your browser using DataLab