Command Reference : Command Reference
  
 
heckit
Estimate a selection equation using the Heckman ML or 2-step method.
Syntax
heckit(options) response_eqn @ selection_eqn
The response equation should be the dependent variable followed by a list of regressors. The selection equation should be a binary dependent variable followed by a list of regressors.
Options
General Options
 
2step
Use the Heckman 2-step estimation method. Note that this option is incompatible with the maximum likelihood options below.
coef=arg
Specify the name of the coefficient vector (if specified by list); the default behavior is to use the “C” coefficient vector.
prompt
Force the dialog to appear from within a program.
p
Print the estimation results.
ML Options
Note these options are not available if the "2step" option, above, is used.
 
optmethod = arg
Optimization method: “bfgs” (BFGS); “newton” (Newton-Raphson), “opg” or “bhhh” (OPG or BHHH), “legacy” (EViews legacy).
Newton-Raphson is the default method.
optstep = arg
 
Step method: “marquardt” (Marquardt); “dogleg” (Dogleg); “linesearch” (Line search).
Marquardt is the default method.
cov=arg
Covariance method: “ordinary” (default method based on inverse of the estimated information matrix), “huber” or “white” (Huber-White sandwich methods).,
covinfo = arg
Information matrix method: “opg” (OPG); “hessian” (observed Hessian).
(Applicable when non-legacy “optmethod=”.)
m=integer
Set maximum number of iterations.
c=number
Set convergence criteria.
numericderiv / ‑numericderiv
[Do / do not] use numeric derivatives only. If omitted, EViews will follow the global default.
showopts / ‑showopts
[Do / do not] display the starting coefficient values and estimation options in the estimation output.
s=number
Scale EViews’ starting values by number.
r
Use Newton-Raphson optimizer.
b
Use BHHH optimizer.
Examples
wfopen http://www.stern.nyu.edu/~wgreene/Text/Edition7/TableF5-1.txt
heckit ww c ax ax^2 we cit @ lfp c wa wa^2 faminc we (k618+kl6)>0
heckit(2step) ww c ax ax^2 we cit @ lfp c wa wa^2 faminc we (k618+kl6)>0
This example replicates the Heckman Selection example given in Greene (2008, page 888), which uses data from the Mroz (1987) study to estimate a selection model. The first line of this example downloads the data set, the second line creates an equation object and estimates it using the default maximum likelihood estimation method of Heckman Selection, which replicates the first pane of Table 24.3 in Greene. The third line estimates the same model, using the two-step approach, which replicates the second pane of Table 24.3.
Cross-references
See “Heckman Selection Model” for discussion.