tlamadon / pytwoway

Two way models in python
MIT License
22 stars 6 forks source link

AKM: new variance/covariance options (i.e. new Q matrices) #24

Open adamoppenheimer opened 1 year ago

adamoppenheimer commented 1 year ago

Add option to estimate within and between firm variance for AKM and its bias corrections.

adamoppenheimer commented 1 year ago

Another set of options to add for Q matrices:

adamoppenheimer commented 1 year ago

Add option to break down Q by each group of a particular category.

E.g. you could specify compute var(psi) but separately by firm quantile, where you don’t include firm quantile as a control variable, but just use it for separating the Q matrix.

santiagohermo commented 1 year ago

These look like useful features. I think it'd also be nice to compute variance components within clusters, such as regions.

adamoppenheimer commented 1 year ago

@santiagohermo what is the difference between your suggestion and the last suggestion I wrote?

Also, the last suggestion I wrote is available in the dev version. If you check here, you can see how to use the updated Q code so that you can get the variance components within a particular category/cluster.

santiagohermo commented 1 year ago

Nice @adamoppenheimer, thanks! The package keeps getting better. I'll take a look at the dev version.