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/