[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: simulate consequences of selection bias 101
Dear all,
prompted by a student‘s question when teaching about the virtues of
selection bias I would like to simulate some data which fulfills the
following requirements, whereby Y = b0 + b1*X
1) When regressing Y on X (for the full sample)
b1 = -.5 and significantly < 0
2) When regressing Y on X (for a subsample, say for Y > 10)
b1 = +2 and significantly > 0
I am not sure how to do simulate data that fulfills both requirements.
Any help is greatly appreciated.
Thomas
*
* 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/