Ask Your Question
2

What is the method to obtain a weak instrument test for instrument variables in modelsummary using R?

asked 2021-05-20 11:00:00 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-12-19 02:00:00 +0000

pufferfish gravatar image

To obtain a weak instrument test for instrument variables in modelsummary using R, you can use the "summary_iv()" function from the "ivmodel" package. This function calculates the Sargan-Hansen test for weak instrument validity.

Here's an example code:

```{r} library(ivmodel)

specify your instrumental variable model

iv_model <- ivreg(y ~ x | z1 + z2, data = data)

calculate weak instrument test using summary_iv function

summaryiv(ivmodel) ```

The output will show you the Sargan-Hansen test statistic and its associated p-value. If the p-value is less than your chosen significance level (e.g. 0.05), then you can reject the null hypothesis of no weak instrument problem. If the p-value is greater than your chosen significance level, you cannot reject the null hypothesis and there is no evidence of a weak instrument problem.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-05-20 11:00:00 +0000

Seen: 12 times

Last updated: Dec 19 '21