*! version 1 15March2018
help heckman_scanrho

Title

heckman_scanrho -- A linear regression with sample selection that maximizes the likelihood function by scanning over values of "rho"

Syntax

heckman_scanrho depvar indepvars [if] [in] ,
select(depvar_s = varlist_s
[, offset(varname) noconstant])
[options]

Model
* select() specify selection equation: dependent and independent variables; whether to have constant term and offset variable

minrho(#) specify the minimum value of "rho" to be considered. The default value is -.9

maxrho(#) specify the maximum value of "rho" to be considered. The default value is .9

step(#) specify the size of the step when scanning over values of "rho." The default value is .1

SE/Robust
vce(vcetype) vcetype may be oim,
robust, cluster clustvar, opg, bootstrap, or
jackknife

Reporting
level(#) set confidence level; default is level(95)

nograph suppress the graphical output

Maximization
maximize_options control the maximization process; seldom used

* select() is required. Note that, unlike heckman, depvar_s = must be specified.

bootstrap, by, jackknife, rolling,
statsby, and svy are allowed; see prefix.

Weights are not allowed with the bootstrap prefix.

vce(),
first,
noskip,
and weights are not allowed with the svy prefix.

pweights, fweights, and iweights are allowed; see weight.

Description

heckman_scanrho This is a modification of Stata's heckman that allows the user to scan over values of "rho," the correlation between the unobservables. This command can be used to verify that the results reported by heckman are the maximum likelihood estimates. For more details on heckman, see [R] heckman.

Options

Model

select(...) specifies the variables and options for the
selection equation. It is an integral part of specifying a selection model
and is required.

depvar_s should be coded as 0 or 1, 0 indicating an
observation not selected and 1 indicating a selected observation.

minrho(#) specifies the minimum value of correlation between the unobservables in the selection and outcome
equations to be considered. It must take a value between -1 and 1. Note that convergence may be difficult at values of -1 and 1. The default is -.9.

maxrho(#) specifies the maximum value of correlation between the unobservables in the selection and outcome
equations to be considered. It must take a value between -1 and 1. Note that convergence may be difficult at values of -1 and 1. The default is .9.

step(#) specifies the step size to use when scanning over values of "rho." Note that this procedure will take a long time to run when the step size is small. The default is .1.

SE/Robust

Reporting

level(#); see
[R] estimation options.

Maximization

maximize_options: difficult, technique(algorithm_spec),
iterate(#), [no]log, trace,
gradient, showstep,
hessian, showtolerance,
tolerance(#), ltolerance(#),
nrtolerance(#), nonrtolerance,
from(init_specs); see [R] maximize. These options are seldom
used.

Example

Setup

. use http://fmwww.bc.edu/ec-p/data/wooldridge/mroz

. gen agesq = age^2

. gen child = kidslt6 + kidsge6

Compare with the output from heckman

. heckman lwage educ exper expersq city,sel(inlf= age agesq faminc child educ)

. heckman_scanrho lwage educ exper expersq city,sel(inlf= age agesq nwifeinc child educ)

Saved results

heckman_scanrho saves the following in e():

Scalars

e(N) number of observations

e(k) number of parameters

e(df_m) model degrees of freedom

e(ll) log likelihood

e(rank) rank of e(V)

e(ic) number of iterations

e(rc) return code

e(converged) 1 if converged, 0 otherwise

Matrices

e(b) estimation results

e(init_values) a vector to pass as initial values to heckman

Author

Jonathan Cook, jacook@uci.edu

References

Cook, J., N. Newberger, and J. Lee. 2020. On identification and estimation of Heckman models. Working paper. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3639727

Cook, J., N. Newberger, and J. Lee. 2021. On identification and estimation of Heckman models. Stata Journal, 21(4), p 972-998. https://doi.org/10.1177/1536867X211063149