An open API service indexing awesome lists of open source software.

https://github.com/fixedeffects/vcov.jl

Variance Covariance Matrices for developers
https://github.com/fixedeffects/vcov.jl

Last synced: 4 months ago
JSON representation

Variance Covariance Matrices for developers

Awesome Lists containing this project

README

          

[![Build status](https://github.com/FixedEffects/Vcov.jl/workflows/CI/badge.svg)](https://github.com/FixedEffects/Vcov.jl/actions)

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:
```julia
# 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(...)`.

## References
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.