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   "Jann, Ben" <ben.jann@soz.gess.ethz.ch>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: Estout and predicted signs - new questions
Date   Fri, 4 Mar 2005 21:36:52 +0100

Hervé wrote:
> 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.

Hm, I didn't think about this. That the general stats of the
last model are displayed in the "predicted signs" column is not 
surprising at all because these are the stats which are stored
with the "pred" estimates. In order to supress the stats in the 
estout table, the stats should first be removed from the "pred" 
estimates (or set to ".z"). Your code should thus be:

 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'
 local e_scalars: e(scalars) //get the names of the scalars in e()
 foreach e of local e_scalars { 
  eret2 local `e' , replace  //replace the scalars by empty macros
  //or: eret2 scalar `e' = .z , replace //set the scalars to missing
 }
 estimates store pred

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/



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