AdaemmerP / lpirfs

40 stars 21 forks source link

how to get coefficients of regressions for each horizon in lpirfs? #19

Closed steve-1977 closed 3 years ago

steve-1977 commented 3 years ago

After running the model lp_lin_iv or lp_nl_iv, how do I recover the coefficients of the regression at each horizon? The regression summaries only displays the R-square, adjusted R-square, p-value and F-stat. Surprisingly, the coefficients are not displayed. How do I recover the coefficients. Appreciate your response. I have been trying to find answer to this question for a long time.

AdaemmerP commented 3 years ago

The functions don't return all coefficients of the regression. You can retrieve the responses though, which are the OLS coefficients for the shock variable: results_lin_iv$irf_lin_mean

steve-1977 commented 3 years ago

In my exercise, I am getting the following values for irf_lin_mean

irf_lin_mean [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.4451413 0.12928030 -0.06752242 0.36391793 0.08051357 0.1470133 (GDP response to fiscal shock) [2,] 0.8010953 0.06290938 0.10666273 0.03807104 0.02689255 0.1124031 (expenditure response to fiscal shock)

Since you have reproduced Ramey and Zubairy fiscal multiplier in your lpirf vignette, may I ask you if the multiplier wrt horizon 2 according to the paper can be calculated as 0.12928030 / 0.06290938 from the results of the above regression?

steve-1977 commented 3 years ago

HI,

Can we run the anderson-rubin test to see if the differences in the coefficients across the regimes is statistically significant? I am not sure if such a test is already being estimated somewehere when we run lp_nl_iv. Appreciate some guidance. Thanks, Steve

AdaemmerP commented 3 years ago

No, lpirfs does not run any hidden tests beforehand and the anderson-ruben test is not implemented in the package.