View source: R/regression_models.R
Linear model with sandwich robust covariance estimator | R Documentation |
Linear model with sandwich robust covariance estimator.
covrob.lm(y, x)
y |
A numerical vector with the response variable. |
x |
The design matrix with the data, where each column refers to a different sample of subjects. You must supply the design matrix, with the column of 1s. This function is the analogue of lm.fit and .lm.fit. |
The function performs the usual linear regression model but returns robust standard errors using the sandwich covariance estimator.
A list including:
info |
A matrix with the beta coefficients, their robust standard error, their t-test statistic, and their associated p-value. |
robcov |
The sandwich robust covariance matrix. |
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Introductory Econometrics. A modern approach. Mason, South-Western Cengage Learning, 5th Edition.
het.lmfit, cluster.lm, lm.parboot, cor_test, lm.drop1
x <- matrix( rnorm( 100 * 4), ncol = 4 )
y <- rnorm(100)
a <- covrob.lm(y, x)
x <- NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.