Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: Operators in -reg- or -xtreg-


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Operators in -reg- or -xtreg-
Date   Thu, 12 Aug 2010 16:57:18 +0100

The help for factor variables shows that c.x#c.x does what you want. 

Nick 
n.j.cox@durham.ac.uk 

Hobst

Is it somehow posible to use operators directly inside the regression
code?

for example -xtreg y x (x)^2 , fe didnt work

do i always need to generate a new variable first?

gen x2=x^2
xtreg y x x2, fe

Thanks for your help

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


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