Skip to contents

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

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().

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.

References

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

Author

Andri Signorell <andri@signorell.net>

Examples

r.lm <- lm(Fertility ~ ., swiss)
RobSummary(r.lm)
#>                         est         lci         uci        rse      zval
#> (Intercept)      66.9151817 47.51386488 86.31649848 9.60679535  6.965401
#> Agriculture      -0.1721140 -0.29238964 -0.05183831 0.05955594 -2.889955
#> Examination      -0.2580082 -0.72091206  0.20489558 0.22921240 -1.125630
#> Education        -0.8709401 -1.22176091 -0.52011921 0.17371316 -5.013668
#> Catholic          0.1041153  0.04649549  0.16173517 0.02853116  3.649180
#> Infant.Mortality  1.0770481  0.31060736  1.84348892 0.37951237  2.837979
#>                          pval
#> (Intercept)      1.844004e-08
#> Agriculture      6.132937e-03
#> Examination      2.668685e-01
#> Education        1.073353e-05
#> Catholic         7.364054e-04
#> Infant.Mortality 7.028555e-03