Learn R Programming

QuasiSeq (version 1.0-11-0)

coef.glm: Coefficient and Bias From Generalized Linear Model Fit

Description

coef.glm is a S3 method computing the raw coefficients, leading order bias, and bias corrected coefficients from a generalized linear model (glm) fit.

Usage

# S3 method for glm
coef(object, type = c("raw", "bias", "corrected"), ...)

Value

A numeric vector of requested components. When type='corrected', the 'bias' attribute will be set to a numeric vector of estimated biases being subtracted from the raw coefficients.

Arguments

object

An object with similar structure as returned from glm.

type

A character scalar, being one of 'raw', 'bias', and 'corrected'. 'raw' returns the usual coefficients; 'bias' returns the estimated leading order bias; and 'corrected' returns the coefficients after subtracting the estimated bias.

...

Not used.

Author

Long Qu <rtistician@gmail.com>

References

McCullagh and Nelder (1989) "Generalized Linear Models", 2nd edition. London: Chapman and Hall.

Cordeiro and McCullah (1991) "Bias Correction in Generalized Linear Models", Journal of the Royal Statistical Society: Series B, 53, 629-643.

Examples

Run this code
 x=1:30
 y=rpois(30L, x/10)
 glmfit=glm(y~x, poisson('log'))
 coef(glmfit)
 coef(glmfit, type='bias')
 coef(glmfit, type='corrected')
 

Run the code above in your browser using DataLab