View source: R/robust_lm_inferences.R
robust_lm_inferences | R Documentation |
Estimates a series of robust regressions for a specified regression model.
robust_lm_inferences(data, model, R = 9999, conf = 0.95)
data |
The dataset for the analysis. |
model |
A regression model from lm() |
R |
The number of resamples to be conducted. |
conf |
The confidence level for intervals. |
Returns (1) the lm() regression model with HC4 heteroscedastic covariance consistent standard errors (2) p-values based on the wild bootstrap (and HC4 standard errors) under the null hypothesis. (3) percentile and BCa confidence intervals using case-wise resampling (4) Robust regression analysis from rlm() under the default Huber loss function. (5) Robust regression with resampled wild bootstrap standard errors.
## Not run: x <- c(1,2,3,4,5,6) y <- c(2.1,1.9,2.1,1.8,10,2.2) temp_data <- as.data.frame(cbind(y, x)) lm_model <- lm(y~x, data=temp_data) robust_lm_inferences(data=temp_data, model=lm_model) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.