glmmML                package:glmmML                R Documentation

_G_e_n_e_r_a_l_i_z_e_d _L_i_n_e_a_r _M_o_d_e_l_s _w_i_t_h _r_a_n_d_o_m _i_n_t_e_r_c_e_p_t

_D_e_s_c_r_i_p_t_i_o_n:

     Fits GLMs with random intercept by Maximum Likelihood and
     numerical integration via Gauss-Hermite quadrature.

_U_s_a_g_e:

     glmmML(formula, data = list(), cluster = NULL, family = binomial,
     start.coef = NULL, start.sigma = NULL, offset = NULL, method = "vmmin",
     control = glm.control(epsilon = 1e-08, maxit = 100, trace = FALSE),
     n.points = 16) 

_A_r_g_u_m_e_n_t_s:

 formula: a symbolic description of the model to be fit. The details of
          model specification are given below.

    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

  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.

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.

  method: the method to be used in fitting the model. The default (and
          presently only) method `vmmin' uses the BFGS method in the
          'optim' function.

 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.

_D_e_t_a_i_l_s:

     After the 'vmmin' function has converged, an ordinary
     Newton-Raphson procedure finishes the maximization. As a
     by-product, the variance-covariance is estimated.

_V_a_l_u_e:

     The return value is a list, an object of class 'glmmML'.

_N_o_t_e:

     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.

_A_u_t_h_o_r(_s):

     Gran Brostrm

_R_e_f_e_r_e_n_c_e_s:

     Brostrm (2003). Generalized linear models with random intercepts.
     <URL: http://www.stat.umu.se/forskning/glmmML.pdf>

_S_e_e _A_l_s_o:

     'optim',  'glmm' in Lindsey's 'repeated' package, and 'glmmPQL' in
     'MASS'.

_E_x_a_m_p_l_e_s:

     x <- cbind(rep(1, 14), rnorm(14))
     y <- rbinom(14, prob = 0.5, size = 1)
     id <- rep(1:7, 2)
     dat <- data.frame(y = y, x1 = x[, 2])
     glmmML(y ~ x1, data = dat, cluster = id)

