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

Re: st: RE: Estout and predicted signs - new questions


From   "Herve STOLOWY" <[email protected]>
To   <[email protected]>
Subject   Re: st: RE: Estout and predicted signs - new questions
Date   Fri, 04 Mar 2005 15:54:13 +0100

Dear Ben:

It worked and I am very close to the end result. There is still a little problem. In the utput, under each column of coefficients, for each model, I get the general stats (N, F...). Surprisingly, in the column "predicted signs", instead of getting blanks on the ligns corresponding to the general stats, I obtain the general stats of the last model.

I provide the last version of my command:

use measures_all6

regress  absence1 common ownership, cluster(name) robust, if name!="MEX" & name!="PER"

est store m1, title(Model 1)

regress  absence1 common ownership finance_aggregate, cluster(name) robust, if name!="MEX" & name!="PER"

est store m2, title(Model 2)

tempname b
matrix `b' = e(b)
matrix `b'[1,1] = -999   //neg. sign for common
matrix `b'[1,2] = +999   //pos. sign for ownership
matrix `b'[1,3] = .z     //no sign for finance_aggregate
matrix `b'[1,4] = 998    //? for _cons
eret2 matrix signs = `b'
estimates store pred

estout pred m1 m2 using estout_signs, replace substitute(-999.000 - 999.000 + 998.000 ?) cells ("signs(pat (1 0 0)) b(fmt(%9.3f) pat(0)) p(fmt(%9.3f) pattern(0))") stats (N F p r2 r2_a, fmt(%9.0f %9.3f %9.3f %9.3f %9.3f) labels ("Number of observations" "F" "Prob>F" "R-square" "Adjusted R-square")) label  varlabels(_cons Constant)

Best regards

Herv�


***********************************************************
Professeur/Professor
Coordinateur du D�partement/Head of Department
HEC Paris
D�partement Comptabilit� Contr�le de gestion / Dept of Accounting and Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
France
Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
[email protected]
http://campus.hec.fr/profs/stolowy/perso/home.htm
>>> [email protected] 03/04/05 8:42 AM >>>
Herv� wrote:
> I refer to a problem I mentioned earlier and which was solved
> by the second solution you proposed originally (the one with
> the program prsign, eclass): in my estout output, I want to
> have the results of two regressions:
>
> regress y var1 var2
> regress y var1 var2 var3.
>
> In the predicted signs column, I need to have the three
> variables var1, var2 and var3, although >the first model only
> uses var1 and var2.
>
> It seems to me that your latest solution (with tempname b) is
> related to only one model.

No, not necessarily. Consider:

  sysuse auto
  regress price mpg weight
  est sto model0
  regress price mpg weight foreign
  estimates store model1
  tempname b
  matrix `b' = e(b)
  matrix `b'[1,1] = -999   //neg. sign for mpg
  matrix `b'[1,2] = +999   //pos. sign for weight
  matrix `b'[1,3] = .z     //no sign for foreign
  matrix `b'[1,4] = 998    //? for _cons
  eret2 matrix signs = `b'
  estimates store pred
  estout pred model0 model1, cells("signs(pat(1 0 0)) b(pat(0))") ///
    substitute(-999 - 999 + 998 ?)

ben

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


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



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