* Sample Selection in Female Labour Supply Model * * Keywords: * regression, ols, maximum likelihood, ml, heckman, female, labour, supply, * sample selection, unobserved effects * * Description: * We correct the Female Labour Force participation model by accounting for * the sample selection problems and use three different estimation procedures * * Author(s): * Noel Roy * Skif Pankov * * Source: * William H. Greene, Econometric Analysis - 7th Edition * Pearson International Edition, Chapter 19, Example 19.11 (page 918) * sample 1 753 * Reading the datafile and naming the variables, specifying to ignore the * first 37 lines of the file read (TableF5-1.shd) lfp whrs kl6 k618 age educatn ww rpwg hhrs ha he hw income & mtr wmed wfed un cit ax /skiplines=1 * Setting up regression variables genr age2=age**2 genr kids=dum(kl6+k618) genr ax2=ax**2 par 8000 * List of independent variables for the 1st-stage probit estimation x1: age age2 income educatn kids * List of independent variables for the 2nd-stage OLS estimation x2: ax ax2 educatn cit * Binary variable for probit estimation rename lfp sel * Dependent variable for 2nd-stage OLS estimation rename ww dep * Running a Probit regression probit sel [x1] / index=alphaw cov=sig imr=lambda pcov * Running OLS on the selected sample set nowarnskip skipif (sel.eq.0) ols dep [x2] ols dep lambda [x2] / resid=err coef=beta stderr=olsstd gen1 n=$n gen1 k=$k gen1 theta=beta:1 print theta genr constant=1 genr delta=lambda*(lambda+alphaw) copy err e copy delta capdelta copy [x1] constant w copy lambda [x2] constant xstar delete skip$ matrix capdelta=diag(capdelta) matrix deltabar=trace(capdelta)/n matrix sigsqe=e'e/n+theta**2*deltabar matrix sige=sqrt(sigsqe) * Standard Error of 2nd Stage (OLS) corrected for selection print sige gen1 rhosq=theta**2/sigsqe gen1 rho=(abs(theta)/theta)*sqrt(rhosq) * Correlation Between error in regression and error in selection print rho matrix q=rhosq*(xstar'capdelta*w)*sig*(w'*capdelta*xstar) matrix asyvcov=sigsqe*inv(xstar'xstar)* & (xstar'(iden(n)-rhosq*capdelta)*xstar + q)*inv(xstar'*xstar) * Consistent Variance-Covariance Matrix of 2nd Stage (OLS) print asyvcov matrix asyse=diag(asyvcov) matrix asyse=sqrt(asyse) * Consistent Standard Errors for 2nd Stage (OLS) sample 1 k print beta olsstd asyse stop