Statalist


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

Re: st: simulate consequences of selection bias 101


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: simulate consequences of selection bias 101
Date   Tue, 1 Apr 2008 10:51:10 -0400

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
<[email protected]> 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/



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