glmmboot               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 _f_i_x_e_d _e_f_f_e_c_t_s _g_r_o_u_p_i_n_g

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

     Fits grouped GLMs with fixed group effects. The significance of
     the grouping is tested by simulation, with a bootstrap approach.

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

     glmmboot(formula, family = binomial, data, cluster, subset, na.action,
     offset, start.coef = NULL,
     control = glm.control(epsilon = 1e-08, maxit = 100, trace = FALSE), boot = 0)

_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.

  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.

  offset: this can be used to specify an a priori known component to be
          included in the linear predictor during fitting.

start.coef: starting values for the parameters in the linear predictor.
          Defaults to zero.

 control: Controls the convergence criteria. See 'glm.control' for
          details.

    boot: number of bootstrap replicates. If equal to zero, no test of
          significance of the grouping factor is performed.

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

     The simulation is performed by making random permutations of the
     grouping factor and comparing the maximized loglikelihoods. The
     maximizations are performed by profiling out the grouping factor.
     It is a very fast procedure, compared to 'glm', when the grouping
     factor has many levels.

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

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

_N_o_t_e:

     This is a preliminary version and not well tested.

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

     Gran Brostrm

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

     ~put references to the literature/web site here ~

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

     'link{glmmML}', 'optim', 'glmm' in Lindsey's  'repeated' package,
     'GLMM' in 'lme4'and 'glmmPQL' in 'MASS'.

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

     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)
     res <- glmmboot(y ~ x, cluster = id, data = dat, boot = 5000)
     ##system.time(res.glm <- glm(y ~ x + id, family = binomial))

