Variance Covariance Matrices for developers
Author FixedEffects
9 Stars
Updated Last
8 Months Ago
Started In
June 2020

Build status

This package should be used as a backend by package developers. It allows developers to add a ::CovarianceEstimator argument in the fit method defined by their package. See FixedEffectModels for an example.

Each type defined in this package defines the following methods:

# return a vector indicating non-missing observations for standard errors
completecases(table, ::CovarianceEstimator) = trues(size(df, 1))
# materialize a CovarianceEstimator by using the data needed to compute the standard errors
materialize(table, v::CovarianceEstimator) = v
# return variance-covariance matrix
vcov(x::RegressionModel, ::CovarianceEstimator) = error("vcov not defined for this type")
# returns the degree of freedom for the t-statistics and F-statistic
dof_tstat(x::RegressionModel, ::CovarianceEstimator, hasintercept::Bool) = dof_residual(x) - hasintercept

For now, it includes Vcov.simple(), Vcov.robust(), and Vcov.cluster(...).


Kleibergen, F, and Paap, R. (2006) Generalized reduced rank tests using the singular value decomposition. Journal of econometrics

Kleibergen, F. and Schaffer, M. (2007) RANKTEST: Stata module to test the rank of a matrix using the Kleibergen-Paap rk statistic. Statistical Software Components, Boston College Department of Economics.