Hello everyone,
I am performing an endogeneity procedure with ivregress 2sls and I am having some problem with postestimation commands.
I'll put the output in order to (try to) be more clear.
Essentially I have my ivregress command
and then I perform Wooldridge's robust score test and dd it in memory with its relative p-value
Then, I do the same thing with Sargan Score
Once arrived at this point I have two issues.
1) I want to add to my scalars Shea's partial R-square. Normally, as suggested by Stata guide (here), I would proceed like this
However, what I have is the following:
2) I want to see the final output of my model and, in the scalars section at the end of the table, I'd like to see the p-value not as a separate cell but as significance stars of their relative values.
In few words, rather than having this
I'd like to have something like this
In this case, both p-values are above the conventional levels, hence close to the Wooldridge and Sargan values space would be blank.
But, in the case that (for example) I'd have Wooldridge statistically significant at 5% and Sargan statistically significant at 1% I'd like to have something like this
I am performing an endogeneity procedure with ivregress 2sls and I am having some problem with postestimation commands.
I'll put the output in order to (try to) be more clear.
Essentially I have my ivregress command
Code:
quietly ivregress 2sls DepV ( Instrumented = IVs) DepVars , vce(robust) quietly eststo MODEL
Code:
estat endog quietly estadd scalar Wooldridge=r(r_score) quietly estadd scalar p_Wooldridge=r(p_r_score)
Code:
estat overid quietly estadd scalar Sargan=r(score) quietly estadd scalar p_Sargan=r(p_score)
1) I want to add to my scalars Shea's partial R-square. Normally, as suggested by Stata guide (here), I would proceed like this
Code:
estat firststage quietly estadd scalar Shea=r(multiresults)
Code:
estat firststage First-stage regression summary statistics -------------------------------------------------------------------------- | Adjusted Partial Robust Variable | R-sq. R-sq. R-sq. F(2,5190) Prob > F -------------+------------------------------------------------------------ RepRisk1Y | 0.6165 0.6144 0.2747 992.334 0.0000 -------------------------------------------------------------------------- . estadd scalar Shea=r(multiresults) added scalar: e(Shea) = .
In few words, rather than having this
Code:
esttab MODEL, label star(† 0.1 * 0.05 ** 0.001 *** 0.0001) b(%9.4f) mtitles scalars(Wooldridge p_Wooldridge Sargan p_Sargan Shea) Beta estimations are omitted Constant 6.2030*** (15.37) ------------------------------------ Observations 5220 Wooldridge 1.6750 p_Wooldridge 0.1956 Sargan 2.2504 p_Sargan 0.1336 Shea . ------------------------------------ t statistics in parentheses † p<0.1, * p<0.05, ** p<0.001, *** p<0.0001
Code:
Beta estimations are omitted Constant 6.2030*** (15.37) ------------------------------------ Observations 5220 Wooldridge 1.6750 p_Wooldridge Sargan 2.2504 p_Sargan Shea 0.2747 ------------------------------------ t statistics in parentheses † p<0.1, * p<0.05, ** p<0.001, *** p<0.0001
But, in the case that (for example) I'd have Wooldridge statistically significant at 5% and Sargan statistically significant at 1% I'd like to have something like this
Code:
Beta estimations are omitted Constant 6.2030*** (15.37) ------------------------------------ Observations 5220 Wooldridge 1.6750* Sargan 2.2504** Shea 0.2747 ------------------------------------ t statistics in parentheses † p<0.1, * p<0.05, ** p<0.001, *** p<0.0001
Comment