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: Inconsistency/bug in factor variables


From   "Yu Chen, PhD" <profyuchen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Inconsistency/bug in factor variables
Date   Mon, 18 Feb 2013 15:22:49 -0600

I ran the code below, and I got different results for the interaction
term of 0.foreign#0b.good. Basically, one result showed all zeros for
0.foreign#0b.good, but the other result showed a mix of one's and
zero's.
Why did this occur? Thank you in advance for your insights.

sysuse auto, clear
gen good=rep78>3 if rep78<.
list ibn.foreign#i.good
list ibn.foreign##i.good

Yu Chen
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index