Skip to content

Degrees of freedom adjustments for robust standard errors described in Imbens and Kolesár (2016, Review of Economics and Statistics)

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

kolesarm/Robust-Small-Sample-Standard-Errors

Repository files navigation

R-CMD-check Coverage status CRAN_Status_Badge Download statistics

dfadjust

This package implements the small-sample degrees of freedom adjustments for robust and cluster-robust standard errors in linear regression described in Imbens and Kolesár (2016).

SAS version by Nicolas Moreau is available here.

See vignette dfadjust for description of the package (available through vignette("dfadjust") once package is installed), and the package manual for documentation of the package functions.

Example

No clustering:

set.seed(42)
x <- sin(1:10)
y <- rnorm(10)
fm <- lm(y~x)
dfadjustSE(fm)

Clustering:

clustervar <- as.factor(c(rep(1, 6), rep(2, 2), rep(3, 2)))
dfadjustSE(fm, clustervar)

Here we defined the first six observations to be in cluster 1, the next two in cluster 2, and the last three in cluster three.

Installation

You can install the released version of dfadjust from CRAN with:

install.packages("dfadjust")

Alternatively, you can get the current development version from GitHub:

if (!requireNamespace("remotes")) {
  install.packages("remotes")
}
remotes::install_github("kolesarm/Robust-Small-Sample-Standard-Errors")

About

Degrees of freedom adjustments for robust standard errors described in Imbens and Kolesár (2016, Review of Economics and Statistics)

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published