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

View source: R/coefglm.R

coef.glmR Documentation

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 class 'glm'
coef(object, type = c("raw", "bias", "corrected"), ...)

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.

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.

Author(s)

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

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

QuasiSeq documentation built on Aug. 15, 2022, 5:07 p.m.

Related to coef.glm in QuasiSeq...