Learn R Programming

logbin (version 1.0)

nplbin: Non-Positive Log Binomial Regression

Description

Finds the maximum likelihood estimate of a log-link binomial GLM using an EM algorithm, where each of the coefficients in the linear predictor is restricted to be non-positive.

Usage

nplbin(y, x, offset, start, control = list())

Arguments

y
binomial response. May be a single column of 0/1 or two columns, giving the number of successes and failures.
x
non-negative covariate matrix.
offset
non-positive additive offset vector. The default is a vector of zeros.
start
starting values for the parameter estimates. All elements must be less than or equal to -control$bound.tol.
control
a logbin.control object, which controls the fitting process.

Value

  • A list containing the following components
  • coefficientsthe constrained non-positive maximum likelihood estimate of the parameters.
  • residualsthe residuals at the MLE, that is y - fitted.values
  • fitted.valuesthe fitted mean values.
  • rankthe number of parameters in the model (named "rank" for compatibility -- we assume that models have full rank)
  • familyincluded for compatibility -- will always be binomial(log).
  • linear.predictorsthe linear fit on link scale.
  • devianceup to a constant, minus twice the maximized log-likelihood.
  • aica version of Akaike's An Information Criterion, minus twice the maximized log-likelihood plus twice the number of parameters.
  • aic.ca small-sample corrected version of Akaike's An Information Criterion (Hurvich, Simonoff and Tsai (1998)).
  • null.deviancethe deviance for the null model, comparable with deviance. The null model will include the offset and an intercept.
  • iterthe number of iteration of the EM algorithm used.
  • weightsincluded for compatability -- a vector of ones.
  • prior.weightsthe number of trials associated with each binomial response.
  • df.residualthe residual degrees of freedom.
  • df.nullthe residual degrees of freedom for the null model.
  • ythe y vector used.
  • convergedlogical. Did the EM algorithm converge (according to conv.test)?
  • boundarylogical. Is the MLE on the boundary of the parameter space -- i.e. are any of the coefficients < control$bound.tol?
  • loglikthe maximized log-likelihood.
  • nn.designthe non-negative x matrix used.

Details

This is a workhorse function for logbin, and runs the EM algorithm to find the constrained non-positive MLE associated with a log-link binomial GLM. See Marschner and Gillett (2012) for full details.

References

Hurvich, C.M., J.S. Simonoff and C.-L. Tsai (1998): "Smoothing parameter selection in non-parametric regression using an improved Akaike information criterion," Journal of the Royal Statistical Society: Series B, 60, 271--293. Marschner, I.C. and A.C. Gillett (2012): "Relative risk regression: reliable and flexible methods for log-binomial models," Biostatistics, 13, 179--192.