Heckit - clear capture log close log using Heckit,replace...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 clear capture log close log using Heckit,replace *Heckit.do: *Answers to Practice Question No. 2 *a) *set up the X variable: set obs 1000 gen pollution=_n/100 *b) *create the error term: gen e=100*invnorm(uniform()) *create the outcome variable and scatter plot: gen value=1000 - pollution*50 + e scatter value pollution, ti(data scatter for full sample) more *show OLS regression is unbiased in the full sample: reg value pollution *(save predicted values for future use:) predict valhatFS more *c) *show OLS is biased toward zero if the sample is selected: reg value pollution if value<=800 predict valhatSS if value<=800 scatter value valhatSS valhatFS pollution if value<=800, yscale(r(300 1200)) msymbol(0 i) connect(. l) /* */ title(selected versus full sample OLS estimates) more *d) *run the reduced form probit: gen insample=0 replace insample=1 if value<=800 probit insample pollution *calculate lambda for each obs from the probit coefficients: gen I =_b[_cons] + _b[pollution]*pollution
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/26/2011 for the course ECON 250A taught by Professor Kuhn during the Fall '09 term at UCSB.

Page1 / 4

Heckit - clear capture log close log using Heckit,replace...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online