## Stata 15 help for boxcox_postestimation

```
[R] boxcox postestimation -- Postestimation tools for boxcox

Postestimation commands

The following postestimation commands are available after boxcox:

Command            Description
-------------------------------------------------------------------------
estat ic         Akaike's and Schwarz's Bayesian information criteria
(AIC and BIC)
estat summarize  summary statistics for the estimation sample
estat vce        variance-covariance matrix of the estimators (VCE)
estimates        cataloging estimation results
hausman          Hausman's specification test
* lincom           point estimates, standard errors, testing, and
inference for linear combinations of coefficients
* nlcom            point estimates, standard errors, testing, and
inference for nonlinear combinations of coefficients
predict          predictions, residuals, influence statistics, and
other diagnostic measures
* test             Wald tests of simple and composite linear hypotheses
* testnl           Wald tests of nonlinear hypotheses
-------------------------------------------------------------------------
* Inference is valid only for hypotheses concerning lambda and theta.

Syntax for predict

predict [type] newvar [if] [in] [, statistic options]

statistic          Description
-------------------------------------------------------------------------
Main
yhat             predicted value of y; the default
residuals        residuals
-------------------------------------------------------------------------

options            Description
-------------------------------------------------------------------------
Options
smearing         compute statistic using smearing method; the default
btransform       compute statistic using back-transform method
-------------------------------------------------------------------------

These statistics are available both in and out of sample; type predict
... if e(sample) ... if wanted only for the estimation sample.

Statistics > Postestimation

Description for predict

predict creates a new variable containing predictions such as predicted
values and residuals.

Options for predict

+------+
----+ Main +-------------------------------------------------------------

yhat, the default, calculates the predicted value of the dependent
variable.

residuals calculates the residuals, that is, the observed value minus the
predicted value.

+---------+
----+ Options +----------------------------------------------------------

smearing calculates the statistics yhat and residuals using the smearing
method proposed by Duan (1983) (see Methods and formulas for a
description of this method). smearing is the default.

btransform calculates the statistics yhat and residuals using the
back-transform method (see Methods and formulas for a description of
this method).

Remarks

boxcox estimates variances only for the lambda and theta parameters (see
the technical note in [R] boxcox), so the extent to which postestimation
commands can be used following boxcox is limited.  Formulas used in
lincom, nlcom, test, and testnl are dependent on the estimated variances.
Therefore, the use of these commands is limited and generally applicable
only to inferences on the lambda and theta coefficients.

Examples

Setup
. webuse nhanes2
. boxcox bpdiast bmi tcresult, notrans(age sex) model(theta) lrtest

Calculate the predicted values using the default smearing method
. predict yhat

Calculate the predicted values using the back-transform method
. predict yhatb, btransform

Reference

Duan, N. 1983. Smearing estimate: A nonparametric retransformation
method.  Journal of the American Statistical Association 78: 605-610.

```