Dear Statausers,
I'm trying to use estout to format the coefficients of several regressions
as well as the result of an F test that I'm implementing on each of of these
models. I've been trying to use eret2 to store the pvalues of my F test, and
although it works fine when I'm working with one single model (Example 1),
it does not produce the desired effects when I'm trying to store the
results of multiple models through the command estimates store
(Example 2).
Can I use estout for this purpose? Is there any alternative way to implement
this?
I would really appreciate any suggestions on this matter.
All the very best,
JP
********************* Example 1 *********************
sysuse auto, clear
regress price weight mpg
test weight = mpg
eret2 scalar p_wtmpg = r(p)
estout, stats(N r2 r2_a p_wtmpg)
.
b
weight 1.746559
mpg -49.51222
_cons 1946.069
N 74
r2 .2933891
r2_a .2734846
p_wtmpg .5513822
********************* Example 2 *********************
sysuse auto, clear
regress price weight mpg
estimates store m1
test weight = mpg
eret2 scalar p_wtmpg = r(p)
regress price weight mpg length turn
estimates store m2
test weight = mpg = length = turn
eret2 scalar p_wtmpg = r(p)
estout m*, stats(N r2 r2_a p_wtmpg) style(fixed)
m1 m2
b b
weight 1.746559 5.029726
mpg -49.51222 -94.65136
length -73.14738
turn -323.8606
_cons 1946.069 19581.42
N 74 74
r2 .2933891 .4128186
r2_a .2734846 .3787791
p_wtmpg
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/