robust_lm_inferences: Estimates a series of robust regressions for a specified...

View source: R/robust_lm_inferences.R

robust_lm_inferencesR Documentation

Estimates a series of robust regressions for a specified regression model.

Description

Estimates a series of robust regressions for a specified regression model.

Usage

robust_lm_inferences(data, model, R = 9999, conf = 0.95)

Arguments

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.

Value

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.

Examples

## 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)

jbiesanz/fabs documentation built on July 15, 2022, 11:02 p.m.