Estimates the parameters of the classic Heckman model via Maximum Likelihood method. The initial start is obtained via the two-step method.

HeckmanCL(selection, outcome, data = sys.frame(sys.parent()), start = NULL)

Arguments

selection

Selection equation.

outcome

Primary Regression Equation.

data

Database.

start

initial values.

Value

Returns a list with the following components.

Coefficients: Returns a numerical vector with the best estimated values of the model parameters;

Value: The value of function to be minimized (or maximized) corresponding to par.

loglik: Negative of value. Minimum (or maximum) of the likelihood function calculated from the estimated coefficients.

counts: Component of the Optim function. A two-element integer vector giving the number of calls to fn and gr respectively. This excludes those calls needed to compute the Hessian, if requested, and any calls to fn to compute a finite-difference approximation to the gradient.

hessian: Component of the Optim function, with pre-defined option hessian=TRUE. A symmetric matrix giving an estimate of the Hessian at the solution found. Note that this is the Hessian of the unconstrained problem even if the box constraints are active.

fisher_infoHC: Fisher information matrix

prop_sigmaHC: Square root of the Fisher information matrix diagonal

level: Selection variable levels

nObs: Numeric value representing the size of the database

nParam: Numerical value representing the number of model parameters

N0: Numerical value representing the number of unobserved entries

N1: Numerical value representing the number of complete entries

NXS: Numerical value representing the number of parameters of the selection model

NXO: Numerical value representing the number of parameters of the regression model

df: Numerical value that represents the difference between the size of the response vector of the selection equation and the number of model parameters

aic: Numerical value representing Akaike's information criterion.

bic: Numerical value representing Schwarz's Bayesian Criterion

initial.value: Numerical vector that represents the input values (Initial Values) used in the parameter estimation.

Examples

data(MEPS2001)
attach(MEPS2001)
#> The following objects are masked from MEPS2001 (pos = 3):
#> 
#>     age, age2, agefem, ambexp, blhisp, dambexp, dhospexp, educ,
#>     fairpoor, female, ffs, good, hospexp, income, ins, instype,
#>     instype_s1, lambexp, lnambx, totchr, vgood, year01
#> The following objects are masked from MEPS2001 (pos = 4):
#> 
#>     age, age2, agefem, ambexp, blhisp, dambexp, dhospexp, educ,
#>     fairpoor, female, ffs, good, hospexp, income, ins, instype,
#>     instype_s1, lambexp, lnambx, totchr, vgood, year01
selectEq <- dambexp ~ age + female + educ + blhisp + totchr + ins + income
outcomeEq <- lnambx ~ age + female + educ + blhisp + totchr + ins
HeckmanCL(selectEq, outcomeEq, data = MEPS2001)
#> $coefficients
#>  (Intercept)          age       female         educ       blhisp       totchr 
#> -0.676054447  0.087936135  0.662664579  0.061948465 -0.363937492  0.796951550 
#>          ins       income  (Intercept)          age       female         educ 
#>  0.170136713  0.002707766  5.044061441  0.211974841  0.348142614  0.018715790 
#>       blhisp       totchr          ins        sigma          rho 
#> -0.218570297  0.539919016 -0.029987525  1.271017348 -0.130601085 
#> 
#> $value
#> [1] -5836.219
#> 
#> $loglik
#> [1] 5836.219
#> 
#> $counts
#> gradient 
#>       22 
#> 
#> $hessian
#>               XS(Intercept)         XSage      XSfemale        XSeduc
#> XS(Intercept)  -1195.909444   -4597.86239   -447.187811  -15544.13466
#> XSage          -4597.862395  -19140.40211  -1715.628824  -59713.64068
#> XSfemale        -447.187811   -1715.62882   -447.187811   -5839.20635
#> XSeduc        -15544.134660  -59713.64068  -5839.206346 -210324.33797
#> XSblhisp        -467.449924   -1731.96562   -194.730135   -5707.13455
#> XStotchr        -203.934934    -846.15633    -73.569467   -2581.84080
#> XSins           -402.339530   -1656.33995   -132.765206   -5304.95307
#> XSincome      -40618.461787 -162172.68017 -13128.851583 -553593.36373
#> XO(Intercept)    -82.937170    -323.24255    -34.259451   -1091.63716
#> XOage           -323.242402   -1362.51700   -130.593940   -4251.37940
#> XOfemale         -34.259451    -130.59405    -34.259451    -447.07667
#> XOeduc         -1091.632875   -4251.36177   -447.072982  -14947.53551
#> XOblhisp         -29.843843    -112.87983    -14.481207    -369.71522
#> XOtotchr         -16.772167     -70.27938     -6.016024    -212.25263
#> XOins            -28.901765    -118.61304    -10.623548    -386.58671
#> sigma             -4.937961     -22.40171     -3.160842     -70.61856
#> rho              -36.232581    -147.00661     -6.986844    -458.42800
#>                    XSblhisp     XStotchr         XSins      XSincome
#> XS(Intercept) -4.674499e+02  -203.934934   -402.339530   -40618.4618
#> XSage         -1.731966e+03  -846.156326  -1656.339951  -162172.6802
#> XSfemale      -1.947301e+02   -73.569467   -132.765206   -13128.8516
#> XSeduc        -5.707135e+03 -2581.840804  -5304.953071  -553593.3637
#> XSblhisp      -4.674499e+02   -77.817653   -141.619830   -13497.7275
#> XStotchr      -7.781765e+01  -236.708605    -59.414176    -6706.4687
#> XSins         -1.416198e+02   -59.414176   -402.339530   -15631.1407
#> XSincome      -1.349773e+04 -6706.468704 -15631.140671 -2086259.5634
#> XO(Intercept) -2.984384e+01   -16.772169    -28.901765    -2884.8958
#> XOage         -1.128798e+02   -70.279236   -118.612976   -11724.3668
#> XOfemale      -1.448121e+01    -6.016025    -10.623548    -1028.7620
#> XOeduc        -3.697149e+02  -212.248407   -386.584768   -39738.7823
#> XOblhisp      -2.984384e+01    -6.304322     -9.913023     -876.9645
#> XOtotchr      -6.304321e+00   -19.588640     -5.309527     -567.2964
#> XOins         -9.913023e+00    -5.309528    -28.901765    -1139.9883
#> sigma         -9.992005e-01    -2.714692     -2.295165     -229.7436
#> rho           -1.907560e+01    -3.705549    -12.196482    -1394.2449
#>               XO(Intercept)        XOage      XOfemale       XOeduc
#> XS(Intercept)     -82.93717   -323.24240    -34.259451   -1091.6329
#> XSage            -323.24255  -1362.51700   -130.594054   -4251.3618
#> XSfemale          -34.25945   -130.59394    -34.259451    -447.0730
#> XSeduc          -1091.63716  -4251.37940   -447.076674  -14947.5355
#> XSblhisp          -29.84384   -112.87982    -14.481207    -369.7149
#> XStotchr          -16.77217    -70.27924     -6.016025    -212.2484
#> XSins             -28.90176   -118.61298    -10.623548    -386.5848
#> XSincome        -2884.89578 -11724.36676  -1028.762040  -39738.7823
#> XO(Intercept)   -1742.98560  -7187.35012   -964.222412  -23662.3705
#> XOage           -7187.35012 -31810.55192  -3952.669141  -97654.5124
#> XOfemale         -964.22241  -3952.66914   -964.222412  -13068.0329
#> XOeduc         -23662.37049 -97654.51240 -13068.032898 -332253.2803
#> XOblhisp         -481.56059  -1899.01945   -286.232182   -6135.2292
#> XOtotchr         -967.37761  -4325.05759   -588.676824  -13041.4279
#> XOins            -656.64337  -2798.71929   -334.737516   -9013.4979
#> sigma              53.09172    202.41329     18.587519     684.9378
#> rho              -525.35913  -2007.42647   -184.778055   -6783.6773
#>                   XOblhisp      XOtotchr        XOins         sigma
#> XS(Intercept)   -29.843843    -16.772167   -28.901765    -4.9379612
#> XSage          -112.879833    -70.279379  -118.613037   -22.4017080
#> XSfemale        -14.481207     -6.016024   -10.623548    -3.1608421
#> XSeduc         -369.715221   -212.252630  -386.586710   -70.6185604
#> XSblhisp        -29.843843     -6.304321    -9.913023    -0.9992005
#> XStotchr         -6.304322    -19.588640    -5.309528    -2.7146920
#> XSins            -9.913023     -5.309527   -28.901765    -2.2951647
#> XSincome       -876.964524   -567.296400 -1139.988255  -229.7435803
#> XO(Intercept)  -481.560595   -967.377611  -656.643373    53.0917168
#> XOage         -1899.019449  -4325.057593 -2798.719288   202.4132923
#> XOfemale       -286.232182   -588.676824  -334.737516    18.5875186
#> XOeduc        -6135.229157 -13041.427884 -9013.497938   684.9378026
#> XOblhisp       -481.560595   -246.394407  -163.198983    21.5925284
#> XOtotchr       -246.394407  -1677.051456  -331.715447     7.4400240
#> XOins          -163.198983   -331.715447  -656.643373    17.3600369
#> sigma            21.592528      7.440024    17.360037 -3471.9681271
#> rho            -213.099265    -75.505446  -172.499582  -140.8603278
#>                        rho
#> XS(Intercept)   -36.232581
#> XSage          -147.006612
#> XSfemale         -6.986844
#> XSeduc         -458.428004
#> XSblhisp        -19.075596
#> XStotchr         -3.705549
#> XSins           -12.196482
#> XSincome      -1394.244892
#> XO(Intercept)  -525.359131
#> XOage         -2007.426468
#> XOfemale       -184.778055
#> XOeduc        -6783.677280
#> XOblhisp       -213.099265
#> XOtotchr        -75.505446
#> XOins          -172.499582
#> sigma          -140.860328
#> rho            -302.389298
#> 
#> $fisher_infoHC
#>               XS(Intercept)         XSage      XSfemale        XSeduc
#> XS(Intercept)  3.764722e-02 -2.981587e-03 -6.861915e-04 -1.869130e-03
#> XSage         -2.981587e-03  7.519029e-04 -7.408385e-05  3.185889e-05
#> XSfemale      -6.861915e-04 -7.408385e-05  3.713346e-03 -6.268246e-05
#> XSeduc        -1.869130e-03  3.185889e-05 -6.268246e-05  1.447044e-04
#> XSblhisp      -4.210093e-03  1.494982e-04 -2.462658e-04  1.558701e-04
#> XStotchr      -5.776465e-04 -2.405228e-04  7.056688e-05  3.389577e-05
#> XSins         -3.869380e-05 -2.732534e-04  1.904098e-04 -9.986414e-06
#> XSincome       2.842700e-05 -6.512108e-06  1.226652e-05 -5.127877e-06
#> XO(Intercept) -2.647131e-03  3.067367e-04 -2.724159e-04  8.672696e-05
#> XOage          1.643362e-04 -4.145018e-05  1.433647e-05  1.579988e-07
#> XOfemale       2.104534e-04 -3.645200e-05 -9.434599e-05  3.384493e-06
#> XOeduc         1.106758e-04 -4.603138e-06  1.043552e-05 -6.597114e-06
#> XOblhisp       1.161965e-04  1.549618e-05 -4.412218e-05 -9.501428e-06
#> XOtotchr       1.073149e-04 -1.650638e-05  6.296352e-05  6.638890e-07
#> XOins          6.739452e-05  1.383976e-08  1.109091e-05  1.320328e-06
#> sigma         -3.070051e-05  7.400325e-06 -1.543423e-05 -3.397336e-07
#> rho            6.950046e-04 -1.627621e-04  2.957886e-04  4.483697e-06
#>                    XSblhisp      XStotchr         XSins      XSincome
#> XS(Intercept) -4.210093e-03 -5.776465e-04 -3.869380e-05  2.842700e-05
#> XSage          1.494982e-04 -2.405228e-04 -2.732534e-04 -6.512108e-06
#> XSfemale      -2.462658e-04  7.056688e-05  1.904098e-04  1.226652e-05
#> XSeduc         1.558701e-04  3.389577e-05 -9.986414e-06 -5.127877e-06
#> XSblhisp       3.828340e-03  4.718856e-05  6.843061e-05  5.135064e-06
#> XStotchr       4.718856e-05  5.059516e-03  2.557521e-04  1.983789e-06
#> XSins          6.843061e-05  2.557521e-04  3.952760e-03 -7.435960e-06
#> XSincome       5.135064e-06  1.983789e-06 -7.435960e-06  1.732178e-06
#> XO(Intercept)  5.488090e-04 -2.349165e-04 -1.654882e-05  5.020430e-06
#> XOage         -2.219823e-05  1.901221e-05  1.317485e-05 -2.337244e-07
#> XOfemale      -7.152123e-05  6.642616e-05 -2.143937e-06 -1.208984e-06
#> XOeduc        -1.707546e-05  6.372288e-06  1.805726e-06 -1.173944e-07
#> XOblhisp      -1.581116e-04 -3.961079e-05 -1.737364e-05  7.739287e-07
#> XOtotchr      -5.760361e-05 -3.932938e-05 -2.536954e-06 -7.951501e-07
#> XOins         -3.291426e-05  4.074546e-06 -1.765137e-04 -3.390664e-07
#> sigma          1.517225e-05 -1.145107e-05 -1.934819e-06  2.131044e-07
#> rho           -3.091819e-04  1.878099e-04  3.218574e-05 -4.835804e-06
#>               XO(Intercept)         XOage      XOfemale        XOeduc
#> XS(Intercept) -2.647131e-03  1.643362e-04  2.104534e-04  1.106758e-04
#> XSage          3.067367e-04 -4.145018e-05 -3.645200e-05 -4.603138e-06
#> XSfemale      -2.724159e-04  1.433647e-05 -9.434599e-05  1.043552e-05
#> XSeduc         8.672696e-05  1.579988e-07  3.384493e-06 -6.597114e-06
#> XSblhisp       5.488090e-04 -2.219823e-05 -7.152123e-05 -1.707546e-05
#> XStotchr      -2.349165e-04  1.901221e-05  6.642616e-05  6.372288e-06
#> XSins         -1.654882e-05  1.317485e-05 -2.143937e-06  1.805726e-06
#> XSincome       5.020430e-06 -2.337244e-07 -1.208984e-06 -1.173944e-07
#> XO(Intercept)  5.204169e-02 -2.875291e-03 -6.814115e-03 -1.937057e-03
#> XOage         -2.875291e-03  5.293328e-04  2.424289e-04  2.377044e-05
#> XOfemale      -6.814115e-03  2.424289e-04  3.613737e-03  1.386035e-04
#> XOeduc        -1.937057e-03  2.377044e-05  1.386035e-04  1.112452e-04
#> XOblhisp       7.365340e-04 -2.778803e-05 -9.297705e-04  1.951988e-05
#> XOtotchr      -3.836353e-03 -1.413462e-06  7.586663e-04  1.081194e-04
#> XOins         -1.984290e-03 -5.332547e-05  5.093929e-04  2.374043e-05
#> sigma          1.115650e-03 -4.292399e-05 -2.561545e-04 -2.887007e-05
#> rho           -2.266864e-02  8.719727e-04  5.205051e-03  5.865967e-04
#>                    XOblhisp      XOtotchr         XOins         sigma
#> XS(Intercept)  1.161965e-04  1.073149e-04  6.739452e-05 -3.070051e-05
#> XSage          1.549618e-05 -1.650638e-05  1.383976e-08  7.400325e-06
#> XSfemale      -4.412218e-05  6.296352e-05  1.109091e-05 -1.543423e-05
#> XSeduc        -9.501428e-06  6.638890e-07  1.320328e-06 -3.397336e-07
#> XSblhisp      -1.581116e-04 -5.760361e-05 -3.291426e-05  1.517225e-05
#> XStotchr      -3.961079e-05 -3.932938e-05  4.074546e-06 -1.145107e-05
#> XSins         -1.737364e-05 -2.536954e-06 -1.765137e-04 -1.934819e-06
#> XSincome       7.739287e-07 -7.951501e-07 -3.390664e-07  2.131044e-07
#> XO(Intercept)  7.365340e-04 -3.836353e-03 -1.984290e-03  1.115650e-03
#> XOage         -2.778803e-05 -1.413462e-06 -5.332547e-05 -4.292399e-05
#> XOfemale      -9.297705e-04  7.586663e-04  5.093929e-04 -2.561545e-04
#> XOeduc         1.951988e-05  1.081194e-04  2.374043e-05 -2.887007e-05
#> XOblhisp       3.560357e-03 -5.200924e-04 -1.543450e-04  1.639115e-04
#> XOtotchr      -5.200924e-04  1.547043e-03  3.560581e-04 -1.794594e-04
#> XOins         -1.543450e-04  3.560581e-04  2.610008e-03 -7.499920e-05
#> sigma          1.639115e-04 -1.794594e-04 -7.499920e-05  3.377783e-04
#> rho           -3.330839e-03  3.646713e-03  1.523853e-03 -1.035179e-03
#>                         rho
#> XS(Intercept)  6.950046e-04
#> XSage         -1.627621e-04
#> XSfemale       2.957886e-04
#> XSeduc         4.483697e-06
#> XSblhisp      -3.091819e-04
#> XStotchr       1.878099e-04
#> XSins          3.218574e-05
#> XSincome      -4.835804e-06
#> XO(Intercept) -2.266864e-02
#> XOage          8.719727e-04
#> XOfemale       5.205051e-03
#> XOeduc         5.865967e-04
#> XOblhisp      -3.330839e-03
#> XOtotchr       3.646713e-03
#> XOins          1.523853e-03
#> sigma         -1.035179e-03
#> rho            2.163196e-02
#> 
#> $prop_sigmaHC
#> XS(Intercept)         XSage      XSfemale        XSeduc      XSblhisp 
#>   0.194028917   0.027420848   0.060937234   0.012029313   0.061873581 
#>      XStotchr         XSins      XSincome XO(Intercept)         XOage 
#>   0.071130272   0.062870983   0.001316122   0.228126473   0.023007234 
#>      XOfemale        XOeduc      XOblhisp      XOtotchr         XOins 
#>   0.060114366   0.010547285   0.059668729   0.039332461   0.051088237 
#>         sigma           rho 
#>   0.018378747   0.147078064 
#> 
#> $level
#> [1] "0" "1"
#> 
#> $nObs
#> [1] 3328
#> 
#> $nParam
#> [1] 17
#> 
#> $N0
#> [1] 526
#> 
#> $N1
#> [1] 2802
#> 
#> $NXS
#> [1] 8
#> 
#> $NXO
#> [1] 7
#> 
#> $df
#> [1] 3311
#> 
#> $aic
#> [1] 11706.44
#> 
#> $bic
#> [1] 11810.31
#> 
#> $initial.value
#> XS(Intercept)         XSage      XSfemale        XSeduc      XSblhisp 
#>  -0.668643899   0.086814848   0.663505390   0.061883892  -0.365784312 
#>      XStotchr         XSins      XSincome XO(Intercept)         XOage 
#>   0.795747277   0.169106526   0.002677301   5.288927373   0.202466773 
#>      XOfemale        XOeduc      XOblhisp      XOtotchr         XOins 
#>   0.292133967   0.012388871  -0.182865733   0.500633176  -0.046509658 
#>         sigma           rho 
#>   1.290541875  -0.359316986 
#> 
#> attr(,"class")
#> [1] "HeckmanCL" "list"