[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"FUKUGAWA, N." <nfukugawa@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: Listing coefficient of one variable |

Date |
Tue, 13 Sep 2005 22:42:27 +0900 |

Dear all, How can I apply your suggestion to the treatment regression model? forvalues i=1/100 { treatreg y a b c if d==`i', treat(c= l m n ) twostep } Thank you in advance. -- FUKUGAWA Nobuya, Ph.D. nfukugawa@gmail.com Maarten Buis wrote: > You have three options: > > Here all coefficients are different for different values of d: > forvalues i = 1/100 { > reg y a b c if d ==`i' > } > > Here only the coefficient of c changes with values of d (and the coefficient of c is the coefficient when d is that specific value of d): > forvalues i = 1/100 { > gen dum = d~=`i' > gen dumXc =dum*c > di "d = " `i' > reg y a b c dum dumXc > capture drop dum dumXc > } > > A more parsimonious model is obtained if you are willing to assume that the parameter of c changes linearly with d. In this case you can just use an interaction term. Here the coefficient of c is the effect of c when d = 0 and the coefficient of dXc is how much the effect of c changes when d increases with one unit: > gen dXc = d*c > reg y a b c d dXc > > HTH, > Maarten > > > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of FUKUGAWA, N. > Sent: dinsdag 13 september 2005 15:02 > To: statalist@hsphsun2.harvard.edu > Subject: st: Listing coefficient of one variable > > Dear all, > Suppose we run a regression model as follows > reg y a b c > and want to know how coefficient of "c" varies according to "d", > how can I write a program? > > Note: "d" is integer between 1 and 100 and does not appear in the model and we > do not want to write 100 programs such as > reg y a b c if d==1. > > Thanks in advance. > -- > FUKUGAWA Nobuya, Ph.D. > nfukugawa@gmail.com > * > * 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/ > * * 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/

**Follow-Ups**:**RE: st: RE: Listing coefficient of one variable***From:*"Scott Merryman" <smerryman@kc.rr.com>

**References**:**st: RE: Listing coefficient of one variable***From:*"Maarten Buis" <M.Buis@fsw.vu.nl>

- Prev by Date:
**st: RE: Listing coefficient of one variable** - Next by Date:
**RE: st: RE: Listing coefficient of one variable** - Previous by thread:
**st: RE: Listing coefficient of one variable** - Next by thread:
**RE: st: RE: Listing coefficient of one variable** - Index(es):

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