CovarianceMatrices.jl icon indicating copy to clipboard operation
CovarianceMatrices.jl copied to clipboard

Integration with Microeconometrics

Open lbittarello opened this issue 7 years ago • 2 comments

I'm writing the package Microeconometrics, which includes some code to compute covariance matrices. I was wondering if we could merge it into CovarianceMatrices, so that I could focus on point estimation and delegate inference to your package.

Here's my approach. The variance of most estimators take the form inv(H)' * S' * W * S * inv(H), where H is average Jacobian of the moment conditions across observations, S is the matrix of moment conditions for each observation and W is a weight matrix. If the data are clustered, for example, entry (i, j) of W is 1 when i and j belong to the same cluster and 0 otherwise. Microeconometrics has the user precompile W and pass it to the covariance estimator. This step saves time when W is expensive to compute and one is estimating several specifications. Internal functions compute H and S, similar to your bread and meat functions.

Other than the possibility / requirement of precompiling W, Microeconometrics can compute covariance matrices for two-step estimators and the Hausman m-statistic (i.e. the difference in coefficients from two specifications).

Do you think we could integrate our packages?

lbittarello avatar Sep 03 '17 21:09 lbittarello

I am planning to spend some time on the package and generalize the API. Do you have a type from which I can base the extensions?

gragusa avatar Nov 10 '17 16:11 gragusa

I define the main types here. This file contains the programs to compute the variance matrix of one– and two-stage parametric estimators.

lbittarello avatar Nov 12 '17 04:11 lbittarello