Econometric Analysis of Married Women's Labor Force Participation, Study notes of Econometrics and Mathematical Economics

An econometric analysis of married women's labor force participation using data from the psid 82. It includes probit and tobit models, as well as heckman correction for sample selection bias. The models consider various factors such as education, urban residence, minority race, age, experience, unemployment rate, and family income.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-2m5
koofers-user-2m5 šŸ‡ŗšŸ‡ø

10 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MLE-1
TUTORIAL: MLE
PROBIT. PRG:
/*
** Probit MLE Estimation
*/
new ;
@ LOADING DATA @
load dat[1962,25] = mwpsid82.db ; @ Data on married women from PSID @
@ OPEN OUTPUT FILE @
output file = probit.out reset ;
@ DEFINE VARIABLES @
nlf = dat[.,1] ; @ dummy variable for non-labor-force @
emp = dat[.,2] ; @ dummy varrable for employed workers @
wrate = dat[.,3] ; @ hourly wage rate @
lrate = dat[.,4] ; @ log of (hourly wage rate ($)+1) @
edu = dat[.,5] ; @ years of schooling @
urb = dat[.,6] ; @ dummy variable for urban resident @
minor = dat[.,7] ; @ dummy variable for minority race @
age = dat[.,8] ; @ age @
tenure = dat[.,9] ; @ # of months under current employer @
expp = dat[.,10] ; @ years of experience since age 18 @
regs = dat[.,11] ; @ dummy variable for South @
occw = dat[.,12] ; @ dummy variable for white collar @
occb = dat[.,13] ; @ dummy variable for blue collar @
indumg = dat[.,14] ; @ dummy variable for manufacturing industry @
indumn = dat[.,15] ; @ dummy variable for non-manu. industry @
unionn = dat[.,16] ; @ dummy variable for union membership @
unempr = dat[.,17] ; @ local unemployment rate @
ofinc = dat[.,18] ; @ other family income in 1980 ($) @
lofinc = dat[.,19] ; @ log of (other family income + 1) @
kids = dat[.,20] ; @ # of children of age <= 17 @
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Econometric Analysis of Married Women's Labor Force Participation and more Study notes Econometrics and Mathematical Economics in PDF only on Docsity!

TUTORIAL: MLE

PROBIT. PRG:

** Probit MLE Estimation */

new ;

@ LOADING DATA @

load dat[1962,25] = mwpsid82.db ; @ Data on married women from PSID @

@ OPEN OUTPUT FILE @

output file = probit.out reset ;

@ DEFINE VARIABLES @

nlf = dat[.,1] ; @ dummy variable for non-labor-force @ emp = dat[.,2] ; @ dummy varrable for employed workers @ wrate = dat[.,3] ; @ hourly wage rate @ lrate = dat[.,4] ; @ log of (hourly wage rate ($)+1) @ edu = dat[.,5] ; @ years of schooling @ urb = dat[.,6] ; @ dummy variable for urban resident @ minor = dat[.,7] ; @ dummy variable for minority race @ age = dat[.,8] ; @ age @ tenure = dat[.,9] ; @ # of months under current employer @ expp = dat[.,10] ; @ years of experience since age 18 @ regs = dat[.,11] ; @ dummy variable for South @ occw = dat[.,12] ; @ dummy variable for white collar @ occb = dat[.,13] ; @ dummy variable for blue collar @ indumg = dat[.,14] ; @ dummy variable for manufacturing industry @ indumn = dat[.,15] ; @ dummy variable for non-manu. industry @ unionn = dat[.,16] ; @ dummy variable for union membership @ unempr = dat[.,17] ; @ local unemployment rate @ ofinc = dat[.,18] ; @ other family income in 1980 ($) @ lofinc = dat[.,19] ; @ log of (other family income + 1) @ kids = dat[.,20] ; @ # of children of age <= 17 @

wune80 = dat[.,21] ; @ UNKNOWN @ hwork = dat[.,22] ; @ hours of house work per week @ uspell = dat[.,23] ; @ # of unemployed weeks in 1980h @ search = dat[.,24] ; @ # of weeks looking for job in 1980 @ kids5 = dat[.,25] ; @ # of children of age <= 5 @

@ DEFINE # of OBSERVATIONS @

n = rows(dat) ;

@ DEFINE DEPENDENT VARIABLE AND REGRESSORS @

@ Dependent variable @

yy = emp ; vny = {"emp"};

@ Regressors @

xx = ones(n,1)~edu~urb~minor~age~expp~kids~kids5~lofinc ; vnx = {"cons", "edu", "urb", "minor", "age", "expp", "kids", "kids5", "lofinc" };

** DO NOT CHANGE FROM HERE

@ DEFINE INITIAL VALUE @

bb = invpd(xx'xx)*(xx'yy) ;

library optmum; #include optmum.ext; optset ;

proc f(b) ; local ltt ; ltt = yy.ln( cdfn(xxb) ) + (1-yy).ln( 1-cdfn(xxb) ) ; RETP( -sumc(ltt) ) ; ENDP ;

serob = sqrt(diag(covrob)) ; stathess = b~sehess~(b./sehess); statbhhh = b~sebhhh~(b./sebhhh); statrob = b~serob~(b./serob); yyhess = vnx~stathess; yybhhh = vnx~statbhhh; yyrob = vnx~statrob;

[OUTPUT]

Probit Estimation Result

dependent variable: emp log likelihood: -1167. Pseudo R-square: 0. LR test, df, p-val: 377.2165 8.0000 0.

Using Hessian variable coeff. std. err. t-st cons 2.2010 0.5087 4. edu 0.0846 0.0153 5. urb 0.1553 0.0667 2. minor 0.0480 0.0671 0. age -0.0344 0.0040 -8. expp 0.0743 0.0059 12. kids 0.0593 0.0264 2. kids5 -0.5566 0.0513 -10. lofinc -0.2595 0.0556 -4.

Using BHHH variable coeff. std. err. t-st cons 2.2010 0.5226 4. edu 0.0846 0.0151 5. urb 0.1553 0.0679 2. minor 0.0480 0.0736 0. age -0.0344 0.0041 -8. expp 0.0743 0.0059 12. kids 0.0593 0.0259 2. kids5 -0.5566 0.0470 -11. lofinc -0.2595 0.0566 -4.

Using Robust variable coeff. std. err. t-st cons 2.2010 0.4975 4. edu 0.0846 0.0156 5. urb 0.1553 0.0658 2. minor 0.0480 0.0614 0. age -0.0344 0.0039 -8. expp 0.0743 0.0059 12. kids 0.0593 0.0273 2. kids5 -0.5566 0.0576 -9. lofinc -0.2595 0.0548 -4.

kids = dat[.,20] ; @ # of children of age <= 17 @ wune80 = dat[.,21] ; @ UNKNOWN @ hwork = dat[.,22] ; @ hours of house work per week @ uspell = dat[.,23] ; @ # of unemployed weeks in 1980 @ search = dat[.,24] ; @ # of weeks looking for job in 1980 @ kids5 = dat[.,25] ; @ # of children of age <= 5 @

@ DEFINE # of OBSERVATIONS @

n = rows(dat) ;

@ DEFINE DEPENDENT VARIABLE AND REGRESSORS @

@ Dependent variable @

yy = uspell ; vny = {"uspell"};

@ Regressors @

xx = ones(n,1)~kids5~kids~edu~lofinc~age~expp~wrate~occw~occb ; vnx = {"cons", "kids5", "kids", "edu", "lofinc", "age", "expp", "wrate", "occw", "occb" };

** DO NOT CHANGE FROM HERE

@ DEFINE INITIAL VALUE @

bb = invpd(xx'xx)(xx'yy) ; ss = sqrt((yy-xxbb)'(yy-xx*bb)/n) ; bb = bb|ss ;

@ dummy variable for yy @

v = 0 ; yd = dummy(yy,v); yd = yd[.,2] ;

vnx1 = {"sigma"}; vnx = vnx|vnx1 ;

library optmum; #include optmum.ext; optset ;

proc f(b) ; local ltt, q ;

q = rows(b); ltt = yd.( -.5ln(2pi) -.5ln(b[q]^2) -(.5/b[q]^2).(yy-xxb[1:q-1])^2 )

  • (1-yd).ln( 1- cdfn( xxb[1:q-1]/b[q]) ) ;

retp( -sumc(ltt) ) ; endp ;

proc gradien(b) ; local q, i, gge, g1, g2, gap, gac, poi,e ;

q = rows(b) ; gge= zeros(q,1) ;

i = 1; do while i <= n;

gap = pdfn(xx[i,.]b[1:q-1]/b[q]) ; gac = cdfn(xx[i,.]b[1:q-1]/b[q]) ; poi = xx[i,.]b[1:q-1]/b[q] ; e = yy[i] -xx[i,.]b[1:q-1] ; g1 = yd[i]e/b[q]^2xx[i,.]'

  • (1-yd[i])( -gap/b[q]/(1-gac) )xx[i,.]' ;

g2 = yd[i]( -1/b[q] + 1/b[q]^3e^2 )

  • (1-yd[i])( poigap/b[q]/(1-gac) ) ;

gge = gge + (g1|g2) ;

{b,func,grad,retcode} = optmum(&f,b0) ;

@ value of likelihood function @

logl = -func ;

@ Covariance matrix by Hessian @

covhess = invpd(hessi(b)) ;

@ Covariance matrix by BHHH @

proc ff(b) ; local ltt, q;

q = rows(b); ltt = yd.( -.5ln(2pi) -.5ln(b[q]^2) -(.5/b[q]^2).(yy-xxb[1:q-1])^2 )

  • (1-yd).ln( 1- cdfn( xxb[1:q-1])/b[q] ) ;

retp( ltt ) ; endp ;

gtt = gradp(&ff,b); covbhhh = invpd(gtt'gtt) ;

@ Robust covariance matrix @

covrob = covhessinvpd(covbhhh)covhess ;

@ Computing Standard errors @

sehess = sqrt(diag(covhess)); sebhhh = sqrt(diag(covbhhh)); serob = sqrt(diag(covrob)) ;

stathess = b~sehess~(b./sehess); statbhhh = b~sebhhh~(b./sebhhh);

statrob = b~serob~(b./serob); yyhess = vnx~stathess; yybhhh = vnx~statbhhh; yyrob = vnx~statrob;

let mask[1,4] = 0 1 1 1; let fmt[4,3] = "-.s" 8 8 ".lf" 10 4 ".lf" 10 4 ".lf" 10 4;

format /rd 10,4 ; "" ; "Tobit Estimation Result" ; "------------------------" ; " dependent variable: " $vny ; "" ; " log likelihood: " logl ; "" ; " Using Hessian "; "" ; "variable coeff. std. err. t-st " ; yyprin = printfm(yyhess,mask,fmt); " " ; " Using BHHH "; "" ; "variable coeff. std. err. t-st " ; yyprin = printfm(yybhhh,mask,fmt); "" ; " Using Robust "; "" ; "variable coeff. std. err. t-st " ; yyprin = printfm(yyrob,mask,fmt);

output off ;

Using Robust

TRUNC.PRG:

** Truncation MLE Estimation */

new ;

@ LOADING DATA @

load dat[1962,25] = mwpsid82.db ; @ Data on married women from PSID 82 @

@ OPEN OUTPUT FILE @

output file = turnc.out reset ;

@ DEFINE VARIABLES @

dat = delif(dat,dat[.,2] .== 0) ; @Delete nonemployed people@ nlf = dat[.,1] ; @ dummy variable for non-labor-force @ emp = dat[.,2] ; @ dummy varrable for employed workers @ wrate = dat[.,3] ; @ hourly wage rate @ lrate = dat[.,4] ; @ log of (hourly wage rate ($)+1) @ edu = dat[.,5] ; @ years of schooling @ urb = dat[.,6] ; @ dummy variable for urban resident @ minor = dat[.,7] ; @ dummy variable for minority race @ age = dat[.,8] ; @ age @ tenure = dat[.,9] ; @ # of months under current employer @ expp = dat[.,10] ; @ years of experience since age 18 @ regs = dat[.,11] ; @ dummy variable for South @ occw = dat[.,12] ; @ dummy variable for white collar @ occb = dat[.,13] ; @ dummy variable for blue collar @ indumg = dat[.,14] ; @ dummy variable for manufac. industry @ indumn = dat[.,15] ; @ dummy variable for non-manufac. industry @ unionn = dat[.,16] ; @ dummy variable for union membership @ unempr = dat[.,17] ; @ local unemployment rate @ ofinc = dat[.,18] ; @ other family income in 1980 ($) @ lofinc = dat[.,19] ; @ log of (other family income + 1) @

bb = invpd(xx'xx)(xx'yy) ; ss = sqrt((yy-xxbb)'(yy-xx*bb)/n) ; bb = bb|ss ;

library optmum; #include optmum.ext; optset ;

proc f(b) ; local ltt, q ;

q = rows(b); ltt = (-.5ln(2pi)-.5ln(b[q]^2)-(.5/b[q]^2).(yy-xxb[1:q-1])^2 ) -ln( cdfn( xxb[1:q-1]/abs(b[q]) ) ) ;

retp( -sumc(ltt) ) ; endp ;

b0 = bb ; __title = "Tobit MLE "; _opgtol = 1e-6; _opstmth = "bfgs,half"; __output = 1 ;

{b,func,grad,retcode} = optmum(&f,b0) ;

@ value of likelihood function @

logl = -func ;

@ Covariance matrix by Hessian @

covhess = invpd(hessp(&f,b)) ;

@ Covariance matrix by BHHH @

proc ff(b) ; local ltt, q;

q = rows(b); ltt = (-.5ln(2pi)-.5ln(b[q]^2)-(.5/b[q]^2).(yy-xx*b[1:q-1])^2 )

  • ln( cdfn( xx*b[1:q-1]/abs(b[q]) ) ) ;

retp( ltt ) ; endp ;

gtt = gradp(&ff,b); covbhhh = invpd(gtt'gtt) ;

@ Robust covariance matrix @

covrob = covhessinvpd(covbhhh)covhess ;

@ Computing Standard errors @

sehess = sqrt(diag(covhess)); sebhhh = sqrt(diag(covbhhh)); serob = sqrt(diag(covrob)) ;

stathess = b~sehess~(b./sehess); statbhhh = b~sebhhh~(b./sebhhh); statrob = b~serob~(b./serob); yyhess = vnx~stathess; yybhhh = vnx~statbhhh; yyrob = vnx~statrob;

Using Robust

  • cons -4.8340 17.7222 -0. variable coeff. std. err. t-st
  • kids5 3.5827 2.3581 1.
  • kids -0.1792 1.0989 -0.
  • edu -0.2718 0.6642 -0.
  • lofinc 0.8886 1.7398 0.
  • age -0.5739 0.1902 -3.
  • expp -0.0550 0.2686 -0.
  • wrate -1.8647 0.9460 -1.
  • occw -2.1017 3.8091 -0.
  • occb 16.7014 3.5704 4.
  • sigma 28.0552 1.7858 15.
  • cons -73.8799 46.3758 -1. variable coeff. std. err. t-st
  • kids5 9.7156 3.3284 2.
  • kids -2.6155 1.7147 -1.
  • edu -3.0710 1.2146 -2.
  • lofinc 14.4962 4.6603 3.
  • age -0.1635 0.3469 -0.
  • expp -0.6647 0.5411 -1.
  • wrate -2.7669 1.3726 -2.
  • occw 2.2922 4.9224 0.
  • occb -3.9403 5.8350 -0.
  • sigma 16.6620 1.6353 10.

HECKMAN1.PRG:

** Heckman's two-step estimation */ new ;

@ LOADING DATA @ load dat[1962,25] = mwpsid82.db ; @ Data on married women from PSID 82 @

@ OPEN OUTPUT FILE @ output file = heckman1.out reset ;

@ DEFINE VARIABLES @ nlf = dat[.,1] ; @ dummy variable for non-labor-force @ emp = dat[.,2] ; @ dummy varrable for employed workers @ wrate = dat[.,3] ; @ hourly wage rate @ lrate = dat[.,4] ; @ log of (hourly wage rate ($)+1) @ edu = dat[.,5] ; @ years of schooling @ urb = dat[.,6] ; @ dummy variable for urban resident @ minor = dat[.,7] ; @ dummy variable for minority race @ age = dat[.,8] ; @ age @ tenure = dat[.,9] ; @ # of months under current employer @ expp = dat[.,10] ; @ years of experience since age 18 @ regs = dat[.,11] ; @ dummy variable for South @ occw = dat[.,12] ; @ dummy variable for white collar @ occb = dat[.,13] ; @ dummy variable for blue collar @ indumg = dat[.,14] ; @ dummy variable for manufac. industry @ indumn = dat[.,15] ; @ dummy variable for non-manufac. industry @ unionn = dat[.,16] ; @ dummy variable for union membership @ unempr = dat[.,17] ; @ local unemployment rate @ ofinc = dat[.,18] ; @ other family income in 1980 ($) @ lofinc = dat[.,19] ; @ log of (other family income + 1) @ kids = dat[.,20] ; @ # of children of age <= 17 @ wune80 = dat[.,21] ; @ UNKNOWN @ hwork = dat[.,22] ; @ hours of house work per week @ uspell = dat[.,23] ; @ # of unemployed weeks in 1980 @ search = dat[.,24] ; @ # of weeks looking for job in 1980 @ kids5 = dat[.,25] ; @ # of children of age <= 5 @

@ DEFINE # of OBSERVATIONS @ n = rows(dat) ;

@ DEFINE DEPENDENT VARIABLE AND REGRESSORS @

@ Dependent variable @ yy1 = lrate ; vny1 = {"lrate"} ;