Estimates the parameters of the Heckman-BS model
HeckmanBS(selection, outcome, data = sys.frame(sys.parent()), start = NULL)
Selection equation.
Primary Regression Equation.
Database.
initial values.
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_infoBS: Fisher information matrix
prop_sigmaBS: 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.
The HeckmanBS() function fits the Sample Selection Model based on the Birnbaum–Saunders bivariate distribution, it has the same number of parameters as the classical Heckman model. For more information see Bastos and Barreto-Souza (2020)
Fernando de Souza Bastos, Wagner Barreto-Souza (2020). “Birnbaum–Saunders sample selection model.” Journal of Applied Statistics.
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
selectEq <- dambexp ~ age + female + educ + blhisp + totchr + ins + income
outcomeBS <- ambexp ~ age + female + educ + blhisp + totchr + ins
HeckmanBS(selectEq, outcomeBS, data = MEPS2001)
#> $coefficients
#> (Intercept) age female educ blhisp totchr
#> 0.117214034 0.089501504 0.721876433 0.068319402 -0.399014489 0.805650818
#> ins income (Intercept) age female educ
#> 0.179379257 0.003425338 5.778691485 0.246156380 0.410538195 -0.006631595
#> blhisp totchr ins sigma rho
#> -0.215212004 0.588750822 -0.061326485 0.702814527 0.273046399
#>
#> $value
#> [1] -24470.39
#>
#> $loglik
#> [1] 24470.39
#>
#> $counts
#> gradient
#> 26
#>
#> $hessian
#> XS(Intercept) XSage XSfemale XSeduc
#> XS(Intercept) -895.00366 -3549.98275 -408.993983 -1.183478e+04
#> XSage -3549.98275 -15205.09394 -1646.299820 -4.692684e+04
#> XSfemale -408.99398 -1646.29982 -408.993983 -5.447012e+03
#> XSeduc -11834.78124 -46926.84221 -5447.012306 -1.623142e+05
#> XSblhisp -300.71395 -1134.48082 -142.562304 -3.715799e+03
#> XStotchr -234.10974 -987.35081 -106.634901 -2.993895e+03
#> XSins -317.58582 -1350.86535 -131.135226 -4.262447e+03
#> XSincome -31728.57195 -130184.29419 -12713.419815 -4.410972e+05
#> XO(Intercept) 145.91226 574.73379 65.173638 1.934582e+03
#> XOage 574.73407 2440.74505 251.532649 7.613877e+03
#> XOfemale 65.17364 251.53254 65.173638 8.554631e+02
#> XOeduc 1934.59257 7613.91260 855.467042 2.664159e+04
#> XOblhisp 48.98263 186.53811 25.734662 6.111116e+02
#> XOtotchr 35.49441 148.41639 12.583694 4.477180e+02
#> XOins 50.73357 209.64906 19.672647 6.876696e+02
#> sigma 131.43117 519.17599 62.239861 1.737464e+03
#> rho 11.04704 3.69074 -8.270201 -6.094591e+00
#> XSblhisp XStotchr XSins XSincome XO(Intercept)
#> XS(Intercept) -300.71395 -234.10974 -317.58582 -31728.572 145.91226
#> XSage -1134.48082 -987.35081 -1350.86535 -130184.294 574.73379
#> XSfemale -142.56230 -106.63490 -131.13523 -12713.420 65.17364
#> XSeduc -3715.79902 -2993.89452 -4262.44714 -441097.183 1934.58249
#> XSblhisp -300.71395 -75.81600 -88.15668 -8859.777 48.98263
#> XStotchr -75.81600 -285.78544 -65.98744 -7654.964 35.49441
#> XSins -88.15668 -65.98744 -317.58582 -13078.270 50.73357
#> XSincome -8859.77722 -7654.96429 -13078.27031 -1738746.163 5273.97201
#> XO(Intercept) 48.98263 35.49441 50.73357 5273.972 -1887.67336
#> XOage 186.53819 148.41633 209.64917 21632.058 -7560.91710
#> XOfemale 25.73466 12.58370 19.67265 1934.709 -976.37835
#> XOeduc 611.11462 447.71564 687.67340 73915.737 -25852.28240
#> XOblhisp 48.98263 13.89754 16.12141 1431.923 -528.70520
#> XOtotchr 13.89754 42.53849 10.92498 1198.374 -846.88408
#> XOins 16.12141 10.92498 50.73357 2212.221 -652.89490
#> sigma 42.80313 35.85693 43.43284 4910.383 -1263.97681
#> rho 19.24115 -16.02284 -19.73709 471.142 -562.51139
#> XOage XOfemale XOeduc XOblhisp XOtotchr
#> XS(Intercept) 574.7341 65.17364 1934.5926 48.98263 35.49441
#> XSage 2440.7450 251.53254 7613.9126 186.53811 148.41639
#> XSfemale 251.5326 65.17364 855.4670 25.73466 12.58369
#> XSeduc 7613.8772 855.46312 26641.5917 611.11162 447.71795
#> XSblhisp 186.5382 25.73466 611.1146 48.98263 13.89754
#> XStotchr 148.4163 12.58370 447.7156 13.89754 42.53849
#> XSins 209.6492 19.67265 687.6734 16.12141 10.92498
#> XSincome 21632.0582 1934.70930 73915.7373 1431.92281 1198.37354
#> XO(Intercept) -7560.9171 -976.37835 -25852.2824 -528.70520 -846.88408
#> XOage -32512.2602 -3804.91296 -103645.2183 -2042.16975 -3686.39756
#> XOfemale -3804.9130 -976.37835 -13339.3933 -318.85052 -442.86647
#> XOeduc -103645.2183 -13339.39327 -365132.6780 -6961.74532 -11475.32962
#> XOblhisp -2042.1697 -318.85052 -6961.7453 -528.70520 -245.24403
#> XOtotchr -3686.3976 -442.86647 -11475.3296 -245.24403 -1357.38306
#> XOins -2704.8831 -302.77242 -9231.2538 -171.67597 -255.25125
#> sigma -5075.4607 -665.71443 -17243.6647 -353.02637 -585.19986
#> rho -2131.7235 -213.20278 -7338.5351 -212.86241 -83.79770
#> XOins sigma rho
#> XS(Intercept) 50.73357 131.43117 11.047036
#> XSage 209.64906 519.17599 3.690740
#> XSfemale 19.67265 62.23986 -8.270201
#> XSeduc 687.66961 1737.46351 -6.094591
#> XSblhisp 16.12141 42.80313 19.241146
#> XStotchr 10.92498 35.85693 -16.022841
#> XSins 50.73357 43.43284 -19.737094
#> XSincome 2212.22150 4910.38317 471.142022
#> XO(Intercept) -652.89490 -1263.97681 -562.511386
#> XOage -2704.88306 -5075.46066 -2131.723489
#> XOfemale -302.77242 -665.71443 -213.202779
#> XOeduc -9231.25378 -17243.66473 -7338.535062
#> XOblhisp -171.67597 -353.02637 -212.862408
#> XOtotchr -255.25125 -585.19986 -83.797699
#> XOins -652.89490 -423.82997 -178.884679
#> sigma -423.82997 -3647.85504 -785.959797
#> rho -178.88468 -785.95980 -609.319088
#>
#> $fisher_infoBS
#> XS(Intercept) XSage XSfemale XSeduc
#> XS(Intercept) 5.534948e-02 -4.023380e-03 -6.864295e-04 -2.808772e-03
#> XSage -4.023380e-03 9.967557e-04 -2.052827e-04 4.299028e-05
#> XSfemale -6.864295e-04 -2.052827e-04 4.766135e-03 -1.044302e-04
#> XSeduc -2.808772e-03 4.299028e-05 -1.044302e-04 2.157722e-04
#> XSblhisp -6.078003e-03 2.404204e-04 -1.306737e-04 2.266997e-04
#> XStotchr -1.425989e-03 -2.868493e-04 8.322320e-05 7.287642e-05
#> XSins -3.740272e-04 -4.005280e-04 2.960679e-04 8.677763e-06
#> XSincome 4.777139e-05 -7.479664e-06 1.752897e-05 -7.386744e-06
#> XO(Intercept) 3.363856e-03 -2.445830e-04 -3.441012e-05 -1.436140e-04
#> XOage -2.534534e-04 7.587772e-05 -3.524658e-06 -3.376680e-06
#> XOfemale 1.400165e-04 -1.259713e-05 3.376006e-04 -2.230047e-05
#> XOeduc -1.862319e-04 -1.578404e-06 -8.239294e-06 1.378763e-05
#> XOblhisp -5.890060e-04 2.782909e-05 4.722936e-07 2.752756e-05
#> XOtotchr 2.115858e-04 -3.507405e-05 -2.827792e-05 -1.374020e-05
#> XOins 8.045280e-05 -3.177718e-05 2.576322e-05 -1.102904e-05
#> sigma -1.686681e-04 8.645848e-06 1.698589e-05 1.220376e-05
#> rho 1.256989e-03 -6.519526e-05 -8.023200e-05 -8.624263e-05
#> XSblhisp XStotchr XSins XSincome
#> XS(Intercept) -6.078003e-03 -1.425989e-03 -3.740272e-04 4.777139e-05
#> XSage 2.404204e-04 -2.868493e-04 -4.005280e-04 -7.479664e-06
#> XSfemale -1.306737e-04 8.322320e-05 2.960679e-04 1.752897e-05
#> XSeduc 2.266997e-04 7.287642e-05 8.677763e-06 -7.386744e-06
#> XSblhisp 5.527981e-03 1.468296e-04 2.772705e-04 5.418641e-06
#> XStotchr 1.468296e-04 4.652400e-03 5.117805e-04 3.429886e-06
#> XSins 2.772705e-04 5.117805e-04 5.343974e-03 -1.105313e-05
#> XSincome 5.418641e-06 3.429886e-06 -1.105313e-05 2.045751e-06
#> XO(Intercept) -4.455381e-04 2.264664e-04 3.661291e-04 -4.835963e-06
#> XOage 2.097978e-05 -3.463524e-05 -4.265312e-05 2.635819e-07
#> XOfemale -5.057279e-06 -8.115009e-05 -4.767851e-05 8.040675e-07
#> XOeduc 1.549088e-05 -6.690096e-06 -1.786914e-05 1.509520e-07
#> XOblhisp 4.480492e-04 6.045079e-05 8.080080e-05 -8.903573e-07
#> XOtotchr 1.566165e-05 1.269467e-04 -3.024693e-05 8.019458e-07
#> XOins 2.796819e-05 3.271077e-05 3.959553e-04 4.972026e-07
#> sigma -1.052996e-05 3.985147e-05 5.037968e-05 -5.460524e-07
#> rho 5.648562e-05 -2.395913e-04 -3.618450e-04 4.879608e-06
#> XO(Intercept) XOage XOfemale XOeduc
#> XS(Intercept) 3.363856e-03 -2.534534e-04 1.400165e-04 -1.862319e-04
#> XSage -2.445830e-04 7.587772e-05 -1.259713e-05 -1.578404e-06
#> XSfemale -3.441012e-05 -3.524658e-06 3.376006e-04 -8.239294e-06
#> XSeduc -1.436140e-04 -3.376680e-06 -2.230047e-05 1.378763e-05
#> XSblhisp -4.455381e-04 2.097978e-05 -5.057279e-06 1.549088e-05
#> XStotchr 2.264664e-04 -3.463524e-05 -8.115009e-05 -6.690096e-06
#> XSins 3.661291e-04 -4.265312e-05 -4.767851e-05 -1.786914e-05
#> XSincome -4.835963e-06 2.635819e-07 8.040675e-07 1.509520e-07
#> XO(Intercept) 2.981068e-02 -2.000541e-03 -1.962580e-03 -1.381691e-03
#> XOage -2.000541e-03 4.903108e-04 1.156348e-04 2.311871e-06
#> XOfemale -1.962580e-03 1.156348e-04 2.326667e-03 1.260096e-05
#> XOeduc -1.381691e-03 2.311871e-06 1.260096e-05 9.780813e-05
#> XOblhisp -1.485677e-03 6.921575e-05 -3.308260e-04 5.425614e-05
#> XOtotchr -5.000638e-04 -1.331669e-04 7.376951e-05 2.500128e-05
#> XOins 2.184272e-04 -1.029785e-04 1.690835e-04 -5.986388e-05
#> sigma 1.721346e-04 -1.846451e-05 -1.025475e-04 -1.199930e-05
#> rho -2.866700e-03 1.104751e-04 6.316968e-04 9.367736e-05
#> XOblhisp XOtotchr XOins sigma
#> XS(Intercept) -5.890060e-04 2.115858e-04 8.045280e-05 -1.686681e-04
#> XSage 2.782909e-05 -3.507405e-05 -3.177718e-05 8.645848e-06
#> XSfemale 4.722936e-07 -2.827792e-05 2.576322e-05 1.698589e-05
#> XSeduc 2.752756e-05 -1.374020e-05 -1.102904e-05 1.220376e-05
#> XSblhisp 4.480492e-04 1.566165e-05 2.796819e-05 -1.052996e-05
#> XStotchr 6.045079e-05 1.269467e-04 3.271077e-05 3.985147e-05
#> XSins 8.080080e-05 -3.024693e-05 3.959553e-04 5.037968e-05
#> XSincome -8.903573e-07 8.019458e-07 4.972026e-07 -5.460524e-07
#> XO(Intercept) -1.485677e-03 -5.000638e-04 2.184272e-04 1.721346e-04
#> XOage 6.921575e-05 -1.331669e-04 -1.029785e-04 -1.846451e-05
#> XOfemale -3.308260e-04 7.376951e-05 1.690835e-04 -1.025475e-04
#> XOeduc 5.425614e-05 2.500128e-05 -5.986388e-05 -1.199930e-05
#> XOblhisp 2.827221e-03 -1.175317e-04 -2.365934e-05 7.273428e-05
#> XOtotchr -1.175317e-04 1.176412e-03 1.322251e-04 -8.822322e-05
#> XOins -2.365934e-05 1.322251e-04 2.461127e-03 -2.853962e-06
#> sigma 7.273428e-05 -8.822322e-05 -2.853962e-06 4.293782e-04
#> rho -4.682241e-04 5.577668e-04 8.028322e-05 -4.869989e-04
#> rho
#> XS(Intercept) 1.256989e-03
#> XSage -6.519526e-05
#> XSfemale -8.023200e-05
#> XSeduc -8.624263e-05
#> XSblhisp 5.648562e-05
#> XStotchr -2.395913e-04
#> XSins -3.618450e-04
#> XSincome 4.879608e-06
#> XO(Intercept) -2.866700e-03
#> XOage 1.104751e-04
#> XOfemale 6.316968e-04
#> XOeduc 9.367736e-05
#> XOblhisp -4.682241e-04
#> XOtotchr 5.577668e-04
#> XOins 8.028322e-05
#> sigma -4.869989e-04
#> rho 3.291287e-03
#>
#> $prop_sigmaBS
#> XS(Intercept) XSage XSfemale XSeduc XSblhisp
#> 0.235264699 0.031571438 0.069037199 0.014689186 0.074350390
#> XStotchr XSins XSincome XO(Intercept) XOage
#> 0.068208504 0.073102488 0.001430298 0.172657710 0.022142963
#> XOfemale XOeduc XOblhisp XOtotchr XOins
#> 0.048235537 0.009889800 0.053171619 0.034298861 0.049609750
#> sigma rho
#> 0.020721444 0.057369735
#>
#> $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] 48974.79
#>
#> $bic
#> [1] 49078.66
#>
#> $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.288927375 0.202466774
#> XOfemale XOeduc XOblhisp XOtotchr XOins
#> 0.292133955 0.012388869 -0.182865720 0.500633181 -0.046509659
#> sigma rho
#> 1.290541887 -0.359316995
#>
#> attr(,"class")
#> [1] "HeckmanBS" "list"