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 16:34:04 -0400

Indeed, -xi- doesn't do continuous interactions (odd, in my view, but I don't use it so haven't noticed or thought about it.

I believe the help for -anova- makes clear that it accepts that syntax -- one more way the world of ANOVA talks and thinks differently, while doing the same thing as those of us in the world of regression, I suppose.

--NW

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

Thanks.  Hwever, isn't xi about categorical variables?  I have two
continuous variables to interact.  I know that I can create a new
variable (gen x1x2=x1*x2)...  What is curious is that if I say

anova y x1 x2 x1*x2

it works.

Larry

On 4/7/06, Nick Winter <[email protected]> wrote:
> 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/
>

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