Statalist The Stata Listserver


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

Re: st: interaction terms with regress (and logit...)


From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: interaction terms with regress (and logit...)
Date   Fri, 07 Apr 2006 15:40:16 -0400

Because x1*x2 is not a variable in your dataset (and is not even a valid name for a variable).

You can either create a new variable that is the product of x1 and x2:

generate x1Xx2 = x1*x2

and use that in your model, or learn about the -xi- command, which does this sort of thing on the fly.

--Nick Winter



At 03:32 PM 4/7/2006, you wrote:

Dear COlleagues:

How come

logit y x1 x2 x1*x2

gives an error "variable x1*x2 not found?"

Thanks,

Larry

*
*   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/
--------------------------------------------------------
Nicholas Winter                           607.255.8819 t
Assistant Professor                       607.255.4530 f
Department of Government              [email protected] e
308 White Hall            falcon.arts.cornell.edu/nw53 w
Cornell University
Ithaca, NY 14853-4601


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