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

RE: st: RE: Listing coefficient of one variable


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Listing coefficient of one variable
Date   Tue, 13 Sep 2005 10:42:51 -0500

-statsby- seems to work for me:
        
. use http://www.stata-press.com/data/r9/labor.dta,clear

. mark wc if we>12

. statsby, by(cit) clear:treatreg ww wa , treat(wc=wmed ) twostep
(running treatreg on estimation sample)

      command:  treatreg ww wa, treat(wc=wmed ) twostep
           by:  cit

Statsby groups
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..

. l, noobs

 
+-------------------------------------------------------------------------+
  | cit     ww_b_wa    ww_b_wc   ww_b_c~s   wc_b_w~d   wc_b_cons   hazard~a
|
 
|-------------------------------------------------------------------------|
  |   0   -.0195075   2.130432    2.50804   .2851474   -3.925529   -.608214
|
  |   1   -.0066475    .723393   2.440629   .1568492    -1.91108   .4416668
|
 
+-------------------------------------------------------------------------+

In your original formulation: 

-treatreg y a b c if d==`i', treat(c= l m n) twostep- 
               ^^^

This c variable will be dropped since it is the treatment equation.

What error message do you receive with the -forv- loop?


Scott



> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of FUKUGAWA, N.
> Sent: Tuesday, September 13, 2005 9:54 AM
> To: [email protected]
> Subject: Re: st: RE: Listing coefficient of one variable
> 
> Thank you for your cooperation.
> "treatreg" does not allow to use "statsby" and the program I wrote in the
> previous mail does not work.
> Any help would be appreciated.
> --
> FUKUGAWA Nobuya, Ph.D.
> [email protected]
> 


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