Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: simulate consequences of selection bias 101


From   Thomas Gschwend <gschwend@uni-mannheim.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: simulate consequences of selection bias 101
Date   Tue, 01 Apr 2008 21:50:39 +0200

Very nice. Thanks a bunch.
Thomas

Austin Nichols schrieb:
OK,
how about heteroskedasticity plus selection on the dependent variable?

clear
set seed 12345
range x 0 10 500
g error = invnorm(uniform())*2*x
g y=5-.5*x+error
reg y x
reg y x if y>10
gr7 y x, yli(10)


On Tue, Apr 1, 2008 at 9:47 AM, Thomas Gschwend
<gschwend@uni-mannheim.de> wrote:
I meant to say "selection on the dependent variable". I wanted to let
 the students see that we might even get a sign flip if we select on the
 dependent variable and run a regression of the range-restricted Y on X.

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



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