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
- Host: GitHub
- URL: https://github.com/fixedeffects/vcov.jl
- Owner: FixedEffects
- License: other
- Created: 2020-06-12T13:25:40.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-12-12T15:19:11.000Z (6 months ago)
- Last Synced: 2025-12-23T06:07:10.015Z (6 months ago)
- Language: Julia
- Homepage:
- Size: 95.7 KB
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](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.