PAR 8000 * * Probit Model Estimation * SAMPLE 1 753 READ (mroz.txt) LFP WHRS KL6 K618 WA WE WW RPWG HHRS HA HE HW FAMINC & MTR WMED WFED UN CIT AX / SKIPLINES=1 * Analyze wife's property income GENR PRIN=(FAMINC-WW*WHRS)/1000 DIM LWW 753 GENR WA2=WA*WA * Restrict the sample to those who work SAMPLE 1 428 GENR LWW=LOG(WW) * Estimate a wage determination equation ?OLS LWW WA WA2 WE CIT AX * Estimate a predicted wage for non-workers ?FC / PREDICT=LWW BEG=429 END=753 * Probit Estimation SAMPLE 1 753 PROBIT LFP LWW PRIN KL6 K618 WA WE UN CIT / PITER=0 * * Heckit Sample Selectivity Procedure * DIM LTWW 753 SAMPLE 1 428 GENR LTAX=LOG(1-MTR) * Calculate an after-tax wage rate variable GENR LTWW=LTAX+LWW ****************************************************************** * Sample Selection-Corrected Estimation ("Heckit") * * Programmmer: * David A. Jaeger * The University of Michigan * * Background: * Heckman (1979) discusses the bias that results from using * nonrandomly selected samples when estimating behavioral * relationships as "omitted variables" bias. He proposes * a simple consistent method to estimate these models, * using a bivariate normal model for the selection equation, * and ordinary least squares to estimate the behavioral * equation with the selected sample. * * Greene (1981) notes that the standard errors in the OLS * stage that are typically computed can either be smaller * or larger than the correct standard errors, not * just smaller as Heckman had asserted. He then derives * a simple-to-compute formula for the correct variance- * covariance matrix of the OLS estimates. * * Description: * This program uses SHAZAM's PROBIT and OLS routines to * estimate the parameters of the Heckman model and SHAZAM's * MATRIX language to calculate the correct standard errors * for the second stage (OLS). * *********************************************************************** * ================= DATA INPUT REQUIREMENTS ==================== * * Modify this section as appropriate SAMPLE 1 753 * List of independent variables for the 1st-stage probit estimation X1: PRIN KL6 K618 WA WE UN CIT WA2 WFED WMED * List of independent variables for the 2nd-stage OLS estimation X2: PRIN KL6 K618 WA WE UN CIT WA2 WFED WMED * Binary variable for probit estimation RENAME LFP SEL * Dependent variable for 2nd-stage OLS estimation RENAME LTWW DEP * ==================== END OF DATA INPUT ======================= ***** First Stage: Run Probit PROBIT SEL [X1] / INDEX=ALPHAW COV=SIG IMR=LAMBDA PCOV ***** Second Stage: Run OLS on the selected sample SET NOWARNSKIP SKIPIF (SEL.EQ.0) 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