* Reference: Chapter 11 of * Ernst R. Berndt, The Practice of Econometrics, Addison-Wesley, 1991. SAMPLE 1 753 READ (MROZ) / NAMES * 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 * Exercise 3 (a) SAMPLE 1 753 OLS LFP LWW PRIN KL6 K618 WA WE UN CIT / PREDICT=FIT STATS FIT * Exercise 3 (b) and (c) SAMPLE 1 753 PROBIT LFP LWW PRIN KL6 K618 WA WE UN CIT / COEF=PO PITER=0 LOGIT LFP LWW PRIN KL6 K618 WA WE UN CIT / COEF=LO PITER=0 * Compare estimated effects for the logit and probit models * Calculate the labor force participation rate P GEN1 P=428/753 DISTRIB P / INVERSE GEN1 FP=$PDF SAMPLE 1 9 GENR LOE=P*(1-P)*LO GENR POE=FP*PO PRINT LOE POE * Exercise 4 * Restrict the sample to those who work SAMPLE 1 428 OLS WHRS LWW PRIN KL6 K618 WA WE / HETCOV COEF=BETA * Calculate the Goldberger-Greene adjusted estimates GEN1 P=428/753 PRINT P SAMPLE 1 7 GENR BCON=BETA/P * Estimation of a TOBIT model SAMPLE 1 753 TOBIT WHRS LWW PRIN KL6 K618 WA WE / COEF=ALPHA * Get the regression coefficients GEN1 SIGMA=SQRT($SIG2) SAMPLE 1 7 GENR BTOBIT=ALPHA*SIGMA PRINT BETA BCON BTOBIT * Exercise 6 and 7 SAMPLE 1 753 GENR WE2=WE*WE GENR WA3=WA2*WA GENR WE3=WE2*WE GENR WAWE=WA*WE GENR WA2WE=WA2*WE GENR WAWE2=WA*WE2 PROBIT LFP PRIN KL6 K618 WA WE UN CIT WA2 WE2 WAWE WA3 WE3 WA2WE & WAWE2 WFED WMED / IMR=INVR1 PITER=0 * Estimate a wage determination equation - restrict sample to payed workers * Include INVR1 as a regressor as a sample selectivity adjustment SAMPLE 1 428 GENR LTAX=LOG(1-MTR) * Calculate an after-tax wage rate variable GENR LTWW=LTAX+LWW OLS LTWW PRIN KL6 K618 WA WE UN CIT WA2 WE2 WAWE WA3 WE3 WA2WE & WAWE2 WFED WMED INVR1 / HETCOV PREDICT=PLTWW * Estimate an hours worked equation GENR VPRIN=(1-MTR)*PRIN 2SLS WHRS LTWW PRIN VPRIN LTAX KL6 K618 WA WE INVR1 & (PLTWW PRIN VPRIN LTAX KL6 K618 WA WE INVR1) / COEF=BETA2 RESID=U * Test the hypothesis that married women optimally consider income taxes TEST TEST PRIN=0 TEST LTAX=0 END TEST TEST LTAX=-LTWW TEST VPRIN=0 END * Calculate heteroscedasticity-consistent standard errors GENR U2=U*U GENR ONE=1 * Copy regressors into the matrix X COPY LTWW PRIN VPRIN LTAX KL6 K618 WA WE INVR1 ONE X * Copy instruments into the matrix Z COPY PLTWW PRIN VPRIN LTAX KL6 K618 WA WE INVR1 ONE Z MATRIX X=Z*(INV(Z'Z)*(Z'*X)) MATRIX XINV=INV(X'X) MATRIX HC=XINV*(X'DIAG(U2)*X)*XINV * Calculate the corrected standard errors and t-ratios MATRIX HSE=SQRT(DIAG(HC)) SAMPLE 1 10 GENR T=BETA2/HSE PRINT BETA2 HSE T STOP