se: Standard errors of coefficient estimates

Description Usage Arguments Details Value See Also Examples

View source: R/se.R

Description

Get the standard error of the estimates of the model parameters.

Usage

1
se(model, vce = NULL)

Arguments

model

an estimated model returned by lm or similar functions.

vce

an object indicating how to obtain the covariance matrix.

Details

The parameter vce controls how the covariance matrix of estimates is computed:

The model object should support the coef and vcov methods.

Value

A named vector with the standard errors of the estimates.

See Also

sandwich::vcovHC, sandwich::NeweyWest.

Examples

1
2
3
4
5
6
7
data("hprice1")

mod <- lm(price ~ sqrft + bdrms, data = hprice1)
se(mod)

# Get heteroskedasticity robust standard errors
se(mod, vce = "HC")

jcpernias/ec1027 documentation built on Dec. 20, 2021, 10:03 p.m.