Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Equivalent variables but different results


From   "Yu Chen, PhD" <[email protected]>
To   [email protected]
Subject   st: Equivalent variables but different results
Date   Thu, 11 Jul 2013 21:46:17 +0800

Dear Statalist,
I ran the following code, and made sure that dd is equivalent to
c.length#i1.foreign, and foreign is equivalent to i1.foreign by using
the list command.
However, when I put the variables into regressions, I got very
different results. I want to know why this happened.
Thank you.

sysuse auto , clear
gen dd=length*foreign
list foreign i1.foreign dd c.length#i1.foreign
reg mpg dd foreign
reg mpg c.length#i1.foreign i1.foreign
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index