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" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Estout and predicted signs - new questions
Date   Sat, 5 Mar 2005 16:46:55 +0100

Herv�, you need to store the predicted signs in a matrix that
contains all variables. Thus, estimate a model with all variables 
before defining the signs. In your case:

 regress em_leuz rank_investor rank_legal rank_absence1 ///
  rank_divergence1 investor legal_enforcement absence1 divergence1
 tempname b
 matrix `b' = e(b)
 ...

ben

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Herve STOLOWY
> Sent: Saturday, March 05, 2005 10:32 AM
> To: [email protected]
> Subject: RE: st: RE: Estout and predicted signs - new questions
> 
> 
> Dear Ben:
> 
> I tried and it worked for three out of four of my estout 
> outputs. However, I have a fourth and more complex table 
> which generates a conformability error. In summary, it has 
> the following structure:
> 
> Model 1: regress y var1 var2
> Model 2: regress y var1 var2 var3
> Model 3: regress y var1 var2 var4
> Model 4: regress y var1 var2 var3 var4
> Model 5: regress y var5 var6
> Model 6: regress y var5 var6 var7
> Model 7: regress y var5 var6 var8
> Model 8: regress y var5 var6 var7 var8
> 
> I get a conformability error message after the following command: 
>  matrix `b'[1,6] = -999   //neg. sign for legal enforcement
> 
> Here are the commands:
> 
> regress  em_leuz rank_investor rank_legal, cluster(name) robust
> est store m7, title(Model 1)
> regress  em_leuz rank_investor rank_legal rank_absence1, 
> cluster(name) robust
> est store m8, title(Model 2)
> regress  em_leuz rank_investor rank_legal rank_divergence1, 
> cluster(name) robust
> est store m9, title(Model 3)
> regress  em_leuz rank_investor rank_legal rank_absence1 
> rank_divergence1, cluster(name) robust
> est store m10, title(Model 4)
> regress  em_leuz investor legal_enforcement, cluster(name) robust
> est store m11, title(Model 5)
> regress  em_leuz investor legal_enforcement absence1, 
> cluster(name) robust
> est store m12, title(Model 6)
> regress  em_leuz investor legal_enforcement divergence1, 
> cluster(name) robust
> est store m13, title(Model 7)
> regress  em_leuz investor legal_enforcement absence1 
> divergence1, cluster(name) robust
> est store m14, title(Model 8)
> 
> tempname b
> matrix `b' = e(b)
> matrix `b'[1,1] = -999   //neg. sign for rank of investor protection
> matrix `b'[1,2] = -999   //neg. sign for rank of legal enforcement
> matrix `b'[1,3] = +999   //pos. sign for rank of absence
> matrix `b'[1,4] = 998    //? for rank of divergence
> matrix `b'[1,5] = -999   //neg. sign for investor protection
> matrix `b'[1,6] = -999   //neg. sign for legal enforcement
> matrix `b'[1,7] = +999   //pos. sign for absence
> matrix `b'[1,8] = 998    //? for divergence
> matrix `b'[1,9] = 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
> 
> estout pred m7 m8 m9 m10 m11 m12 m13 m14 using using 
> estout_table6_V3, replace substitute(-999.000 - 999.000 + 
> 998.000 ?) cells ("signs(pat (1 0 0 0 0 0 0 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)
> 
> Maybe the problem arises from the structure of the table 
> which mixes two basic models (with var1 to var4 and then with 
> var 5 to var 8). 
> 
> I can add that in the three other tables, the solution you 
> proposed works perfectly. But they are all based on the 
> accumulation of the same variables (from x1 to x8 for the 
> more complex table).
> 
> Sorry again to bother you but I promise it's the last table.
> 
> Best regards
> 
> Herv�
> 

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