brlr                  package:brlr                  R Documentation

_B_i_a_s-_r_e_d_u_c_e_d _L_o_g_i_s_t_i_c _R_e_g_r_e_s_s_i_o_n

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

     Fits a logistic regression by maximum penalized likelihood, in 
     which the penalty function is the Jeffreys invariant prior.  This
     removes the O(1/n) term from the asymptotic bias of estimated
     coefficients (Firth, 1993), and always yields finite estimates and
     standard errors (whereas the MLE is infinite in situations of
     complete or quasi-complete separation).

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

     brlr(formula, data = NULL, offset, weights, start, ..., subset,
        dispersion = 1, na.action = na.fail, contrasts = NULL,
        x = FALSE, br = TRUE, control = list(maxit = 200))

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

 formula: a model formula as for 'glm', or an object of class 'glm' 

    data: an data frame as for 'glm' 

  offset: an optional vector as for 'glm' 

 weights: an optional vector as for 'glm' 

   start: an optional set of starting values (of the model
          coefficients) for the optimization 

     ...: further arguments passed to or from other methods 

  subset: an optional vector specifying a subset of observations to be
          used in the fitting process 

dispersion: an optional parameter for over- or under-dispersion
          relative to binomial variation - default is 1

na.action: a function which indicates what should happen when the data
          contain `NA's.  The default is set by the 'na.action' setting
          of 'options', and is 'na.fail' if that is unset.  The
          ``factory-fresh'' default is 'na.omit'. 

contrasts: an optional list. See the 'contrasts.arg' of
          'model.matrix.default'.

       x: should the model matrix be included in the resultant object?

      br: a logical switch indicating whether the bias-reducing 
          penalty is applied; default is 'TRUE'

 control: as for 'link{optim}'

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

     'brlr' has essentially the same user interface as
     'glm(family=binomial, ...)' - see the example below.

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

     A model object of class 'brlr', with components 

coefficients: as for 'glm'

deviance: as for 'glm'

penalized.deviance: deviance minus 2*logdet(Fisher information)

fitted.values: as for 'glm'

linear.predictors: as for 'glm'

    call: as for 'glm'

 formula: as for 'glm'

convergence: logical, did the optimization converge?

   niter: number of iterations of the optimization algorithm (BFGS via
          'optim')

df.residual: as for 'glm'

 df.null: as for 'glm'

   model: as for 'glm'

       y: the observed binomial proportions, as for 'glm'

  family: a 'family' object, binomial with logistic link,  as for 'glm'

  offset: as for 'glm'

prior.weights: as for 'glm'

   terms: as for 'glm'

dispersion: as for 'glm'; the 'dispersion' argument if supplied,
          otherwise 1

bias.reduction: logical, the value of argument 'br'

leverages: the diagonal elements of the model's ``hat'' matrix

      qr: as for 'glm'

    rank: as for 'glm'

FisherInfo: the estimated Fisher information matrix

contrasts: as for 'glm'

 xlevels: as for 'glm'

residuals: as for 'glm'

    data: as for 'glm'

boundary: as for 'glm'; but always 'FALSE'

       x: if 'x = TRUE' is specified

 control: the 'control' list as used in the call to 'optim'

_N_o_t_e:

     1.  Methods specific to the 'brlr' class of models are 

        *  'print.brlr'

        *  'summary.brlr'

        *  'print.summary.brlr'

        *  'vcov.brlr'

        *  'predict.brlr'

        *  'add1.brlr'

        *  'drop1.brlr'

     Others are inherited from the 'glm' class.

     2.  The results of the bias-reduced fit typically have regression
     coefficients slightly closer to zero than the maximum likelihood
     estimates, and slightly smaller standard errors.  (In logistic
     regression, bias reduction is achieved by a slight shrinkage of
     coefficients towards zero; thus bias reduction also reduces
     variance.)  The difference is typically small except in situations
     of sparse data and/or complete separation.  See also Heinze and
     Schemper (2002).

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

     David Firth, d.firth@warwick.ac.uk

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

     Firth, D. (1993)  Bias reduction of maximum likelihood estimates.
     _Biometrika_ *80*, 27-38.

     Firth, D. (1992)  Bias reduction, the Jeffreys prior and GLIM. In 
     _Advances in GLIM and Statistical Modelling_, Eds. L Fahrmeir, B J
     Francis, R Gilchrist and G Tutz, pp91-100.  New York: Springer.

     Heinze, G. and Schemper, M. (2002)  A solution to the problem of
     separation in logistic regression.  _Statistics in Medicine_ *21*,
     2409-2419.

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

     ## Habitat preferences of lizards, from McCullagh and Nelder (1989, p129);
     ## this reproduces the results given in Firth (1992).
     ##
     ## First the standard maximum-likelihood fit:
     data(lizards)
     glm(cbind(grahami, opalinus) ~ height + diameter + light + time,
         family = binomial, data=lizards)
     ## Now the bias-reduced version:
     brlr(cbind(grahami, opalinus) ~ height + diameter + light + time,
         data=lizards)

