Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest change to: topics/Analyze/causal-inference/panel-data/system-gmm.md #1262

Open
marinho1000 opened this issue Aug 17, 2024 · 2 comments
Assignees

Comments

@marinho1000
Copy link

Hi
Thank you for the great post. Could you add a section on how to display the instrument count? Roodman 2009 (p. 128) recommend to report the instrument count and unfortunately, I do not know how to display the number of instruments with the pgmm package.

Best regards

@srosh2000
Copy link

@valerievossen This is regarding the GMM article you wrote (https://tilburgsciencehub.com/topics/analyze/causal-inference/panel-data/system-gmm/) -- would be great if you could look into this addition?

@valerievossen
Copy link
Contributor

Hi @marinho1000,

Thank you for the suggestion!

I added a section on how to find the total number of instruments (last section).

The changes still have to merged, but this can already help:
W contains a list with the instruments used per cross-sectional observation (Found in the pgmm documentation: https://www.rdocumentation.org/packages/plm/versions/2.6-4/topics/pgmm). So, summing up these values will result in the total instrument count.

This is the code I used (building further upon the example model in the article):

W_list <- dyn_model$W
total_instruments <- sum(sapply(W_list, function(x) ncol(x)))

Please let me know if this answers your question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants