RobSummary: Robust Summary for Linear Models

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ModTools.R

Description

For poisson models with mild violation of the distribution assumption that the variance equals the mean, Cameron and Trivedi (2009) recommended using robust standard errors for the parameter estimates. The function uses the function vcovHC from the package sandwich to obtain the robust standard errors and calculate the p-values accordingly. It returns a matrix containing the usual results in the model summary, comprising the parameter estimates, their robust standard errors, p-values, extended with the 95% confidence interval.

Usage

1
RobSummary(mod, conf.level = 0.95, type = "HC0")

Arguments

mod

the model for which robust standard errors should be calculated

conf.level

the confidence level, default is 95%.

type

a character string specifying the estimation type. Details in vcovHC().

Details

Further details in https://stats.idre.ucla.edu/r/dae/poisson-regression/

Value

a p x 6 matrix with columns for the estimated coefficient, its standard error, t- or z-statistic, the corresponding (two-sided) p-value, the lower and upper confidence interval.

Author(s)

Andri Signorell <andri@signorell.net>

References

Cameron, A. C. and Trivedi, P. K. (2009) Microeconometrics Using Stata. College Station, TX: Stata Press.

See Also

summary.lm, summary.glm

Examples

1
2
r.lm <- lm(Fertility ~ ., swiss)
RobSummary(r.lm)

ModTools documentation built on July 26, 2021, 9:06 a.m.