*! version 1.0 24jul2020
help ftruncreg

Title

ftruncreg -- Faster community-contributed substitute for truncreg

Syntax

ftruncreg depvar indepvars [if] [in], [options]

Variables

Model
depvars left-hand-side variable

indepvars right-hand-side variables

options

Main
noconstant suppress constant term

ll(#) left-truncation limit

ul(#) right-truncation limit

SE/Inference
vce(vcetype) vcetype may be oim, opg or robust

robust equivalent to vce(robust)

Reporting
level(#) set confidence level; default as set by set level

nolog suppress display of a log

display_options further options for displaying output

indepvars may contain factor variables; see fvvarlist.

display_options are those available for ereturn display.

The prefix commands bootstrap and jackknife are allowed; by and svy are not allowed; see prefix.

weights are ignored and waring is issued if weights are specified; see weight.

The available postestimation commands are (almost) the same as for truncreg; see
truncreg postestimation.

Description

ftruncreg is a speedier substitute for truncreg that uses the same syntax.
ftruncreg makes full use of Mata’s optimization routines and, for this reason, estimates the truncated regression model (Hausman and Wise, 1977) much faster than truncreg.
The gain in run time is indeed substantial.
For instance, for estimating the first example from truncreg examples, ftruncreg on average requires roughly one-sixth of the computing time of truncreg.
The price for the gain in speed is a reduced set of available options and features.
ftruncreg is hence preferable to truncreg if computing time is a scarce resource.
ftruncreg uses a modified Newton-Raphson algorithm for optimization,
which is the quickest if the likelihood function excludes local maxima as is the case for the likelihood function of the truncated regression model (Orme, 1989); see mf_optimize.

Options

Main

noconstant makes ftruncreg suppress the constant terms in the truncated regression.

ll(#) and ul(#) specify the lower and upper limits for truncation, respectively.
One or both may be specified.
Only real scalars are allowed, but no variables.
That is, unlike truncreg, ftruncreg does not accommodate truncation limits that vary across observations.
ll(#) and/or ul(#) needs to be specified.

SE/Inference

vce(vcetype) specifies the method ftruncreg uses for variance-covariance estimation.
The default is vce(oim); thus by default ftruncreg uses optimize_result_V_oim(S) and returns invsym(-H), which is the variance matrix obtained from the observed information matrix.
With vce(opg) ftruncreg uses optimize_result_V_opg(S) and returns invsym(S'S), which is the variance matrix obtained from the outer product of the gradient vector;
S denotes the matrix of scores.
With vce(robust) ftruncreg uses optimize_result_V_robust(S) and returns invsym(-H)*(S'S)*invsym(-H), which is the sandwich estimator of the variance matrix.
For more details see mf_optimize.

robust is fully equivalent to vce(robust).

Reporting

level(#); see [R] estimation options. One may change the reported confidence level by retyping
ftruncreg without arguments and only specifying the option level(#).

nolog prevents ftruncreg from displaying any output on the screen.

For further display_options, see [R] estimation options.

Example

(see truncreg examples)

Load data

. webuse laborsub

Truncated regression with left-truncation at zero

. ftruncreg whrs kl6 k618 wa we, ll(0)

Truncated regression with left-truncation at zero and robust standard errors

. ftruncreg whrs kl6 k618 wa we, ll(0) r

Truncated regression with left-truncation at zero and right-truncation at 200

. ftruncreg whrs kl6 k618 wa we, ll(0) ul(200)

Saved results

ftruncreg saves the following in e():

Scalars

e(N) number of observations

e(converged) 1 if converged, 0 otherwise

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

e(df_m) model degrees of freedom

e(sigma) estimate of sigma

e(ll) log-likelihood value

e(ic) number of iterations

e(rc) return code

e(level) confidence level

Macros

e(cmdline) command as typed

e(cmd) ftruncreg

e(depvar) name of depvar

e(predict) program used to implement predict

e(marginsok) predictions allowed by margins

e(properties) b V

e(vce) either oim or opg or robust

e(vcetype) Robust if e(vce) : "robust"

Matrices

e(b) vector of estimated coefficients

e(V) estimated variance-covariance matrix

Functions

e(sample) marks estimation sample

References

Hausman, J. and Wise, D. (1977). Social experimentation, truncated distributions, and efficient estimation. Econometrica 45(4), 919-938.

Orme, C. (1989). On the uniqueness of the maximum likelihood estimator in truncated regression models. Econometric Reviews 8(2), 217-222.

Also see

Manual: [R] truncreg, [M-5] optimize()

Help: [R] truncreg, [M-5] optimize()

Online: simarwilson

Authors

Oleg Badunenko

Brunel University

London,
UK

E-mail: oleg.badunenko@brunel.ac.uk

Harald Tauchmann

Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU)

Nürnberg,
Germany

E-mail: harald.tauchmann@fau.de

Disclaimer

This software is provided "as is" without warranty of any kind, either expressed or implied. The entire risk as to the quality and
performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair or
correction. In no event will the copyright holders or their employers, or any other party who may modify and/or redistribute this software,
be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to
use the program.

Acknowledgements

We would like to thank Joseph Newton and one anonymous referee for pointing us the run time issue when bootstrapping the truncated regression model using Stata.