*! Version 1.0.0 09 August 2017

Title

nehurdle -- estimation command for data with corner solutions.

Syntax

General Syntax:

nehurdle depvar [indepvars] [if] [in]
[weight] [,
{heckman|tobit|trunc} shared_options
specific_options ]

Tobit's Syntax:

nehurdle depvar [indepvars] [if] [in]
[weight] , tobit
[ shared_options ]

Truncated Hurdle's Syntax:

nehurdle depvar [indepvars] [if] [in]
[weight] [, trunc
shared_options specific_options ]

Type II Tobit's Syntax:

nehurdle depvar [indepvars] [if] [in]
[weight] , heckman
[ shared_options specific_options ]

Estimator
heckman required to use the Type II Tobit estimator

tobit required to use the Tobit estimator

trunc optional to use the truncated hurdle estimator; this is
the default if no estimator option is specified

Shared Options
coeflegend display legend instead of statistics

exponential specifies the value equation to be exponential

exposure(varname) include ln(varname) in the value equation
with coefficient constrained to 1

het(hetspec) specifies
the functional form of the value's heteroskedasticity

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

ml options options that work with ml

noconstant suppress constant term in the value equation

nolog do not display the iteration log of the log likelihood

offset(varname) include varname in value equation with
coefficient constrained to 1

vce(vcetype) specifies the method to estimator for the variance
covariance matrix. vcetype may be cluster clustvar, oim,
opg, or robust

Specific Options
The following can also be used with either trunc or heckman estimators

select(selspec) specify the independent variables and options for
the selection equation

hetspec for het() is indepvars, noconstant

selspec for select() is indepvars, het(indepvars)
noconstant exposure(varname) offset(varname)

indepvars may contain factor variables; see [U] fvvarlist.

fweights, iweights, and pweights are allowed; see
[U] weight.

bootstrap, by, fp, jacknife, statsby, and
svy are allowed; see [U] prefix.

Weights are not allowed with either the [R] bootstrap prefix or the
[SVY] svy prefix.

vce() not allowed with the [SVY] svy prefix.

See nehurdle_postestimation for features available after estimation.

Description

nehurdle estimates models for dependent variables with corner
solutions at 0. It collects the following maximum-likelihood estimators: Tobit
(Tobin (1958)), Truncated Hurdle
(Cragg (1971)), and Type II Tobit. It allows for both
linear and exponential specification of the value equation, as well as for
modeling exponential (multiplicative) heteroskedasticity, like in
Harvey (1976), in both the selection and value
processes where appropriate.

In version 14, Stata introduced churdle, a command that
allows estimations of models with bounded dependent variables. churdle
is, in fact a Truncated Hurdle estimator that allows linear and exponential
specifications of the value equation, as well as modeling heteroskedasticity
both in the selection and the value equation. nehurdle differs from
churdle in that nehurdle works on versions 11 and later, not
just 14 and later, in that nehurlde only works on variables that are
bounded from below at zero, a subset of variables on which churdle
works, and in that nehurdle also has the Tobit and Type II Tobit
estimators for linear and exponential specifications of the value equation
that allows modeling of heteroskedasticity in the value and selection
processes, while churdle only does this with the Truncated Hurdle
estimator.

Options

Estimator

These options are mutually exclusive, i.e. only one may be used at a time,
since they specify the estimator to be used.

heckman is required to tell nehurdle to use the Type II Tobit
estimator.

tobit is required to tell nehurdle to use the Tobit estimator.

trunc is optional to tell nehurdle to use the Truncated
Hurdle estimator. This is nehurdle's default estimator, which is why
it is optional to specify it.

Shared Options

These options can be used with all estimators.

coeflegend; see
[R] estimation options.

exponential tells nehurdle to estimate an exponential value
equation. nehurdle will estimate a linear in parameters equation with
the dependent variable being the natural logarithm of the actual variable.

exposure(varname) includes ln(varname) in the model for the
value equation with its coefficient constrained to 1.

het(indepvars, noconstant) lets you specify the functional
form of the value process heteroskedasticity. nehurdle models
multiplicative heteroskedasticity, by specifying the standard deviation of
the value process as an exponential process. It, thus, models the natural
logarithm of the standard deviation of the value process.

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

ml options. nehurdle accepts the following maximum likelihood
options:

collinear tells the maximum-likelihood estimator to keep collinear
variables. This is useful if you know that there are no collinear variables, and
thus, want to save the estimator time by not checking if there are any.

constraints(numlist|matname) specifies the
linear constraints to be applied during estimation. constraints(numlist)
specifies the constraints by number. Constraints are defined using the constraint
command. constraint(matname) specifies a matrix that contains the
constraints. See [R] constraint.

difficult is sometimes helpful when you get the message
"not concave" in many of the iterations of the maximization process (when you
don't specify nolog as an option). This may be a sign that ml's
standard stepping algorithm may not be working well. difficult specifies
that a different stepping algorithm be used in these non-concave regions.
Notice that this may not help, since there is no guarantee that difficult
will make things better than the default. See
[R] ml maximize options.

gradient displays the gradient vector after each iteration if the
log is being displayed, i.e. you have not specified nolog.

hessian displays the negative hessian matrix after each iteration
if the log is being displayed, i.e. you have not specified nolog.

iterate(#) specifies the maximum number of iterations to be used.
If convergence is achieved before reaching that maximum number, the optimizer
stops when convergence is declared. If the maximum number of iterations is
reached before achieving convergence, the optimizer stops as well and presents
the results it has at that iteration number. The default maximum number of
iterations is 16,000. You can change the default maximum number of iterations
with set maxiter.

ltolerance(#) sets the level for log-likelihood tolerance
convergence. When the change in log-likelihood is less than that level,
log-likelihood convergence is achieved. The default is tolerance(1e-6).

nocnsnotes prevents notes on contraints-related errors from
displaying above the estimation results. Sometimes these errors cause constraints
to be dropped, but others the constraint is still applied to the estimation.

nonrtolerance turns off the default nrtolerance() criterion.

nrtolerance(#) specifies the level for scaled graident tolerance.
When the scaled gradient, g*inv(H)*g', has a value that is less than the level
scaled gradient convergence is achieved. The default is nrtolerance(1e-5).

qtolerance(#) sets the level of convergene for the q-H matrix. It
works when specified with algorithms bhhh, dfp, or
bfgs, and tells the otpimizer to uses the q-H matrix as the final check
for convergence rather than scaled gradient and the H matrix.

shownrtolerance is a synonim for showtolerance.

showstep shows information about the steps within an interation in
the iteration log, and shows the log even if you have specified nolog.

showtolerance shows the log-likelihood tolerance in each step in
the iteration log until the log-likelihood convergence criterion has been met.
It then shows the scaled gradient g*inv(H)*g'. It does so even if you have
specified nolog.

technique(algorithm_spec) specifies the algorithm(s) used and when
they are used in the maximization of the log likelihood. The possible algorithms
are: nr, Newton-Raphson algorithm, bhhh, Brendt-Hall-Hall-Hausman
algorithm, dfp, Davidon-Fletcher-Powell (DFP) algorithm, and bfgs,
Broyden-Fletcher-Goldfarb-Shanno algorithm. The default algorithm is nr.
You can specify different algorithms to be used at different intervals of the
iterations. algorithm_spec is algorithm [ # [ algorithm
[#] ] ... ] where algorithm is
{nr|bhhh|dfp|bfgs}. For details, see
Gould, Pitblado, and Poi (2010).

tolerance(#) sets the level for the coefficient vector tolerance.
When the relative change in the coefficient vector is less than the specified
level, coefficient vector convergence is achieved. The default is
tolerance(1e-6).

trace displays the vector of the current estimates of the
coefficients after the each iteration in the iteration log, even if you have
specified nolog.

noconstant; see
[R] estimation options.

nolog tells nehurdle to hide the iteration information of the
maximum-likelihood estiamtor.

offset(varname) adds varname to the model of the value equation
with its coefficient constrained to 1.

vce(vcetype) specifies the type of standard error reported, which
includes types that are robust to some kinds of misspecification
(robust), that allow for intragroup correlation (cluster
clustvar), and that are derived from asymptotic theory
(oim, opg); see [R] vce_option.

Specific Options

select(indepvars, het(indepvars) noconstant exposure(varname) offset(varname))
specifies the composition of the explanatory variables in the selection equation
as well as whether to model heteroskedasticity in the selection equation. This
is an optional option (all of it).

select() only works when using either the Truncated Hurdle estimator
or the Type II Tobit estimator. It doesn't work with the Tobit estimator because
the Tobit estimator doesn't have separate selection and value processes.

The first indepvars sets the independent variables of the selection equation.
If you don't include it nehurdle assumes that the independent variables for
the selection equation are the same as those of the value equation.

het(indepvars) sets the independent variables of the heteroskedasticity
in the selection equation. Like with the value equation, nehurdle models
multiplicative heteroskedasticity in the value equation, so the independent variables
will help explain the natural logarithm of the standard deviation of the selection
process.

noconstant tells nehurdle to not include a constant in the
selection equation.

exposure(varname) adds ln(varname) to the model of the selection
equation and constraints its coefficient to 1.

offset(varname) adds varname to the model of the selection
equation and constraints its coefficient to 1.

You can specify options for the selection equation without specifying
the independent variables of that equation. If you do that nehurdle will
use the same independent variables as for the value equation. For example
select(, noconstant) will use the same independent variables as in the
value equation and not include a constant term in the selection equation.

Since nehurdle assumes normality of the errors in the selection
process, the estimator for the selection equation is actually a Probit estimator,
like probit. When modeling heteroskedasticity in the selection process, it
is the heteroskedastic Probit estimator, like hetprobit.

Examples

Data Setup

. webuse womenwk, clear

. replace wage = 0 if missing(wage)

. global xvars i.married children educ age

Homoskedastic Tobit

. nehurdle wage $xvars, tobit nolog

. tobit wage $xvars, ll

Homoskedastic Exponential Tobit

. nehurdle wage $xvars, tobit expon nolog

. gen double lny = ln(wage)

. summarize lny, mean

. replace lny = (r(min) - 1e-7) if missing(lny)

. tobit lny $xvars, ll

. drop lny

Heteroskedastic Tobit

. nehurdle wage $xvars, tobit het($xvars) offset(age) nolog

Heteroskedastic Exponential Tobit

. nehurdle wage $xvars, tobit expon het($xvars) nolog

Homoskedastic Truncated Hurdle

. nehurdle wage $xvars, nolog

Homoskedastic Exponential Truncated Hurdle

. nehurdle wage $xvars, expon nolog

Heteroskedastic Value Truncated Hurdle

. nehurdle wage $xvars, het($xvars) nolog

Heteroskedastic Selection and Value Truncated Hurdle

. nehurdle wage $xvars, het($xvars) sel(, het($xvars)) nolog

Heteroskedastic Value Exponential Truncated Hurdle

. nehurdle wage $xvars, expon het($xvars) nolog

Homoskedastic Type II Tobit

. nehurdle wage $xvars, heck nolog

. gen byte dy = wage > 0

. heckman wage $xvars, sel(dy = $xvars) nolog

. drop dy

Homoskedastic Exponential Type II Tobit

. nehurdle wage $xvars, heck expon nolog

. gen double lny = ln(wage)

. heckman lny $xvars, sel($xvars) nolog

. drop lny

Heteroskedastic Value Type II Tobit

. nehurdle wage $xvars, heck het($xvars) nolog

Heteroskedastic Selection and Value Type II Tobit

. nehurdle wage $xvars, heck het($xvars) sel(, het($xvars)) nolog

Heteroskedastic Value Exponential Type II Tobit:

. nehurdle wage $xvars, heck expon het($xvars) nolog

Stored Results

nehurdle stores the following in e():

Scalars

e(N) total number of observations

e(N_c) number of censored observations

e(N_clust) number of clusters; reported when vce(cluster
clustvar) is specified; see

e(ll) log likelihood

e(rank) rank of e(V)

e(k) number of parameters

e(k_aux) number of auxiliary parameters

e(k_dv) number of dependent variables

e(k_eq) number of equations in e(b)

e(k_eq_model) number of equations in overall model test

e(ic) number of iterations

e(rc) return code

e(converged) 1 if converged, 0 otherwise

e(df_m) number of non-constant parameters estimated (degrees of
freedom of the overall significance test)

e(chi2) overall significance test Wald chi-squared

e(p) overall significance test significance

e(sel_df) number of non-constant parameters in the selection
equation (degrees of freedom of the joint significance test for the
selection equation); reported for Truncated Hurdle, and Type II Tobit
estimations

e(sel_chi2) selection equation joint significance test Wald
chi-squared; reported for Truncated Hurdle, and Type II Tobit estimations

e(sel_p) selection equation joint significance test significance;
reported for Truncated Hurdle, and Type II Tobit estimations

e(val_df) number of non-constant parameters in the value equation
(degrees of freedom of the joint significance test for the value equation);
reported for all Truncated Hurdle, and Type II Tobit estimations, as well as
for heteroskedastic Tobit estimations

e(val_chi2) value equation joint significance test Wald
chi-squared; reported for all Truncated Hurdle, and Type II Tobit
estimations, as well as for heteroskedastic Tobit estimations

e(val_p) value equation joint significance test significance;
reported for Truncated Hurdle, and Type II Tobit estimations, as well as for
heteroskedastic Tobit estimations

e(het_df) number of non-constant parameters in the value
hetersokedasticity equation (degrees of freedom of the joint significance
test for value heteroskedasticity); reported for all estimations that
model the value heteroksedasticity

e(het_chi2) value heteroskedasticity equation joint significance
test Wald chi-squared; reported for all estimations that model the value
heteroksedasticity

e(het_p) value heteroskedasticity equation joint significance test
significance; reported for all estimations that model the value
heteroksedasticity

e(selhet_df) number of non-constant parameters in the selection
hetersokedasticity equation (degrees of freedom of the joint significance
test for selection heteroskedasticity); reported for all estimations that
model the selection heteroksedasticity

e(selhet_chi2) selection heteroskedasticity equation joint
significance test Wald chi-squared; reported for all estimations that model
the selection heteroksedasticity

e(selhet_p) selection heteroskedasticity equation joint
significance test significance; reported for all estimations that model the
selection heteroksedasticity

e(chi2_c) chi-squared of LR test against Truncated Hurdle;
reported for Type II Tobit estimations

e(p_c) LR test against Truncated Hurdle significance

e(r2) pseudo r-squared

e(gamma) lowest value of the natural logarithm of the dependent
variable in the value equation; reported for exponential models

e(sigma) standard deviation of the value process; reported for
homoskedastic estimations

e(rho) correlation between selection and value errors; reported
for Type II Tobit estimations

e(lambda) lambda; reported for Type II Tobit estimations

Macros

e(cmd) nehurdle

e(cmdline) command as typed

e(cmd_opt) the estimator option: heckman, tobit or
trunc

e(depvar) the dependent variable

e(wtype) type of weight; reported for estimations using weights

e(wexp) weight expression; reported for estimations using weights

e(title) title in estimation output

e(vce) vcetype specified in vce()

e(vcetype) title used to label Std. Err.

e(clustvar) name of cluster variable; reported for estimations
with clustered standard errors

e(opt) type of optimization

e(which) max or min; whether the optimizer is to
perform maximization or minimization

e(method) ml

e(ml_method) type of ml method

e(user) name of likelihood-evaluator program

e(technique) maximization technique

e(properties) b V

e(predict) program used to implement predict

e(asbalanced) factor variables fvset as asbalanced

e(asbobserved) factor variables fvset as asobserved

e(chi2type) Wald; type of model chi-squred test

References

Cragg John G. 1971. Some Statistical Models for Limited Dependent Variables
with Application to the Demand for Durable Goods. Econometrica 39(5):
829-844

Gould, William W., Jeffrey Pitblado, and Brian P. Poi. 2010.
Maximum Likelihood Estimation with Stata. 4th ed.
College Station, TX: Stata Press.

Harvey, Andrew C. 1976. Estimating Regression Models with Multiplicative
Heteroskedasticity. Econometrica 44(3): 461-465

Tobin, James. 1958. Estimation of Relationships for Limited Dependent
Variables. Econometrica 26(1): 24-36

Acknowledgements

I would like to thank Isabel Canette from StataCorp LLC for her patience and
her insightful comments that helped me debug much of nehurdle's predict
functionality.

Author

Alfonso Sánchez-Peñalver

University of South Florida

Tampa, FL USA

alfonsos1@usf.edu

Also See

Manual: [R] heckman, [R] hetprobit, [R] probit,
[R] tobit