View source: R/confint_robust.R
confint_robust | R Documentation |
The confint.lm uses the t-distribution as the default
confidence interval estimator. When there is reason to believe that
the normal distribution is violated an alternative approach using
the vcovHC()
may be more suitable.
confint_robust( object, parm, level = 0.95, HC_type = "HC3", t_distribution = FALSE, ... )
object |
The regression model object, either an ols or lm object |
parm |
a specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered. |
level |
the confidence level required. |
HC_type |
See options for |
t_distribution |
A boolean for if the t-distribution should be used or not. Defaults to FALSE. According to Cribari-Nieto and Lima's study from 2009 this should not be the case. |
... |
Additional parameters that are passed on to
|
matrix
A matrix (or vector) with columns giving lower and
upper confidence limits for each parameter. These will be labelled as
(1-level)/2 and 1 - (1-level)/2 in
n <- 50 x <- runif(n) y <- x + rnorm(n) fit <- lm(y~x) library("sandwich") confint_robust(fit, HC_type = "HC4m")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.