Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: estout and test

From   JP Azevedo <>
Subject   st: estout and test
Date   Wed, 7 Sep 2005 09:54:14 -0300

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

I would really appreciate any suggestions on this matter.

All the very best,


********************* 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)

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

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index