[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Marko Bender" <Marko.Bender@wi.tum.de> |

To |
"'David Roodman'" <DRoodman@CGDEV.ORG>, "'Austin Nichols'" <austinnichols@gmail.com>, <statalist@hsphsun2.harvard.edu> |

Subject |
AW: st: How to calculate a new variable (interaction term) in ml model |

Date |
Tue, 10 Mar 2009 19:57:19 +0100 |

Yes, I do have instruments for the endogenous variable Y1, but they do not work very well for the interaction term Y1*X4. The best would be, if I could simply calculate the interaction term with the fitted endogenous variable Y1. Regards, Marko ____________________________________________________________ Marko Bender Doctoral Candidate / Wissenschaftlicher Mitarbeiter KfW Endowed Chair in Entrepreneurial Finance | Prof. Dr. Dr. Ann-Kristin Achleitner TUM Business School | Technische Universität München (TUM) Arcisstr. 21 | D-80333 München | Germany Tel.: +49 (0)89 289 25189 | Fax: +49 (0)89 289 25188 marko.bender@wi.tum.de | http://www.wi.tum.de/ef -----Ursprüngliche Nachricht----- Von: David Roodman (DRoodman@cgdev.org) [mailto:DRoodman@CGDEV.ORG] Gesendet: Dienstag, 10. März 2009 19:51 An: Marko Bender; Austin Nichols; statalist@hsphsun2.harvard.edu Betreff: RE: st: How to calculate a new variable (interaction term) in ml model If all of your equations are continuous and unbounded ($cmp_cont), then you need excluded instruments in order to identify the model, as in 2SlS--variables that are in the first stage, but not the second. -----Original Message----- From: Marko Bender [mailto:Marko.Bender@wi.tum.de] Sent: Tuesday, March 10, 2009 2:13 PM To: David Roodman (DRoodman@cgdev.org); 'Austin Nichols'; statalist@hsphsun2.harvard.edu Subject: AW: st: How to calculate a new variable (interaction term) in ml model Thanks a lot for your responses. Yes you are right. The term X4*Y1 is also endogenous, but only because of the Y1. Unfortunately, I cannot include the equation (y1x4 = X1 X2 X3) as an additional "First Stage" equation, because I do not find appropriate instruments and the estimation would not converge. Also, in my final model I have more than one interaction term (4 to 6, depending on the model). So the best thing would be, if I could estimate the endogenous variable Y1, calculate the interaction terms and include them in the final equation. Isn't there any way to implement that in STATA? Unfortunately my programming skills are not sufficient enough to modify the cmp procedure or to build my own ml model. The equations get quite complicated due to the Instrumental Variable design. Would be really nice if you could give any further advice. Tanks in advance, Marko ____________________________________________________________ Marko Bender Doctoral Candidate / Wissenschaftlicher Mitarbeiter KfW Endowed Chair in Entrepreneurial Finance | Prof. Dr. Dr. Ann-Kristin Achleitner TUM Business School | Technische Universität München (TUM) Arcisstr. 21 | D-80333 München | Germany Tel.: +49 (0)89 289 25189 | Fax: +49 (0)89 289 25188 marko.bender@wi.tum.de | http://www.wi.tum.de/ef -----Ursprüngliche Nachricht----- Von: David Roodman (DRoodman@cgdev.org) [mailto:DRoodman@CGDEV.ORG] Gesendet: Dienstag, 10. März 2009 17:05 An: Austin Nichols; statalist@hsphsun2.harvard.edu; Marko.Bender@wi.tum.de Betreff: RE: st: How to calculate a new variable (interaction term) in ml model Yes, that is right Austin. Or the y1x4 equation can just be dropped, in which case y1x4 is treated as exogenous. It is of course the user's responsibility to decide whether the y1x4 equation, if any, is appropriate. --David -----Original Message----- From: Austin Nichols [mailto:austinnichols@gmail.com] Sent: Tuesday, March 10, 2009 12:00 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: How to calculate a new variable (interaction term) in ml model Marko Bender <Marko.Bender@wi.tum.de>: I have never used -cmp- (on SSC), but it looks to me like you have two endogenous vars on the RHS in Eq2: Y1 and Y1*X4. You might try g y1x4=Y1*X4 cmp (Eq3: y1x4 = X1 X2 X3) (Eq2: Y2 = Y1 X4 y1x4) (Eq1: Y1 = X1 X2 X3) if that makes sense. On Tue, Mar 10, 2009 at 11:05 AM, Marko Bender <Marko.Bender@wi.tum.de> wrote: > Dear stata users, > > I'm trying to estimate a recursive multi-equation model with cmp. > In the first equation I would like to estimate a variable Y1 (dependent > variable). Then I would like to include this variable as an independent > variable in equation two. So far this is not a problem. > The problem is that I also want to include Y1 as an interaction term with > another variable X4. In order to do that I think I would need to generate a > new variable, which includes the interaction term (X4*Y1). Unfortunately > stata does not allow for any calculations within equations. > > Does anybody know how to do that? Does anybody know a work-around? > > The model looks like this: > > cmp (Eq2: Y2 = Y1 X4 X4*Y1) (Eq1: Y1 = X1 X2 X3), ind($cmp_cont $cmp_cont) > quiet; > > > The equations are defined according to the ml model eq syntax. So one > thought of mine was to include a third equation, which generates my > interaction term. Unfortunately I did not find a way to do that so far. > > I would be really greatefull for any suggestions and help!!! > > Thanks a lot, > Marko * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**Re: st: How to calculate a new variable (interaction term) in ml model***From:*Austin Nichols <austinnichols@gmail.com>

**AW: st: How to calculate a new variable (interaction term) in ml model***From:*"Marko Bender" <Marko.Bender@wi.tum.de>

- Prev by Date:
**st: RE: Re: AW: AW: ereturn list with xtivreg2** - Next by Date:
**st: Stata do file editor won't open** - Previous by thread:
**AW: st: How to calculate a new variable (interaction term) in ml model** - Next by thread:
**st: Cant work from do-file** - Index(es):

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