|
Title
[R] ivtobit postestimation -- Postestimation tools for ivtobit
Description
The following postestimation commands are available after ivtobit:
Command Description
-------------------------------------------------------------------------------------------------------------
contrast contrasts and ANOVA-style joint tests of estimates
(1) estat AIC, BIC, VCE, and estimation sample summary
estat (svy) postestimation statistics for survey data
estimates cataloging estimation results
hausman Hausman's specification test
lincom point estimates, standard errors, testing, and inference for linear combinations of
coefficients
(2) lrtest likelihood-ratio test; not available with two-step estimator
margins marginal means, predictive margins, marginal effects, and average marginal effects
marginsplot graph the results from margins (profile plots, interaction plots, etc.)
nlcom point estimates, standard errors, testing, and inference for nonlinear combinations of
coefficients
predict predictions, residuals, influence statistics, and other diagnostic measures
predictnl point estimates, standard errors, testing, and inference for generalized predictions
pwcompare pairwise comparisons of estimates
(1) suest seemingly unrelated estimation
test Wald tests of simple and composite linear hypotheses
testnl Wald tests of nonlinear hypotheses
-------------------------------------------------------------------------------------------------------------
(1) estat ic and suest are not appropriate after ivtobit, twostep.
(2) lrtest is not appropriate with svy estimation results.
Syntax for predict
After ML or twostep
predict [type] newvar [if] [in] [, statistic]
After ML
predict [type] {stub*|newvarlist} [if] [in] , scores
statistic Description
-------------------------------------------------------------------------------------------------------------
Main
xb linear prediction; the default
stdp standard error of the linear prediction
stdf standard error of the forecast; not available with two-step estimator
pr(a,b) Pr(a < y < b); not available with two-step estimator
e(a,b) E(y | a < y < b); not available with two-step estimator
ystar(a,b) E(y*), y* = max{a,min(y,b)}; not available with two-step estimator
-------------------------------------------------------------------------------------------------------------
These statistics are available both in and out of sample; type predict ... if e(sample) ... if wanted only
for the estimation sample.
stdf is not allowed with svy estimation results.
where a and b may be numbers or variables; a missing (a > .) means minus infinity, and b missing (b > .)
means plus infinity; see missing.
Menu
Statistics > Postestimation > Predictions, residuals, etc.
Options for predict
+------+
----+ Main +-------------------------------------------------------------------------------------------------
xb, the default, calculates the linear prediction.
stdp calculates the standard error of the linear prediction. It can be thought of as the standard error of
the predicted expected value or mean for the observation's covariate pattern. The standard error of the
prediction is also referred to as the standard error of the fitted value.
stdf calculates the standard error of the forecast, which is the standard error of the point prediction for 1
observation. It is commonly referred to as the standard error of the future or forecast value. By
construction, the standard errors produced by stdf are always larger than those produced by stdp; see
Methods and formulas in [R] regress. stdf is not available with the two-step estimator.
pr(a,b) calculates Pr(a < xb + u < b), the probability that y|x would be observed in the interval (a,b).
a and b may be specified as numbers or variable names; lb and ub are variable names;
pr(20,30) calculates Pr(20 < xb + u < 30);
pr(lb,ub) calculates Pr(lb < xb + u < ub); and
pr(20,ub) calculates Pr(20 < xb + u < ub).
a missing (a > .) means minus infinity; pr(.,30) calculates Pr(-infinity < xb + u < 30);
pr(lb,30) calculates Pr(-infinity < xb + u < 30) in observations for which lb > .
and calculates Pr(lb < xb + u < 30) elsewhere.
b missing (b > .) means plus infinity; pr(20,.) calculates Pr(+infinity > xb + u > 20);
pr(20,ub) calculates Pr(+infinity > xb + u > 20) in observations for which ub > .
and calculates Pr(20 < xb + u < ub) elsewhere.
e(a,b) calculates E(xb + u | a < xb + u < b), the expected value of y|x conditional on y|x being in the
interval (a,b), meaning that y|x is truncated. a and b are specified as they are for pr(). e(a,b) is
not available with the two-step estimator.
ystar(a,b) calculates E(y*), where y* = a if xb + u < a, y* = b if xb + u > b, and y* = xb + u otherwise,
meaning that y* is censored. a and b are specified as they are for pr(). ystar(a,b) is not available
with the two-step estimator.
scores, not available with twostep, calculates equation-level score variables.
For models with one endogenous regressor, five new variables are created.
The first new variable will contain the first derivative of the log likelihood with respect to the
probit equation.
The second new variable will contain the first derivative of the log likelihood with respect to the
reduced-form equation for the endogenous regressor.
The third new variable will contain the first derivative of the log likelihood with respect to alpha.
The fourth new variable will contain the first derivative of the log likelihood with respect to
ln(s).
The fifth new variable will contain the first derivative of the log likelihood with respect to ln(v).
For models with j endogenous regressors, j + {(j + 1)(j + 2)}/2 + 1 new variables are created.
The first new variable will contain the first derivative of the log likelihood with respect to the
tobit equation.
The second through (j + 1)th new variables will contain the first derivatives of the log likelihood
with respect to the reduced-form equations for the endogenous variables in the order they were
specified when ivtobit was called.
The remaining score variables will contain the partial derivatives of the log likelihood with respect
to s[1,1], s[2,1], s[3,1], ..., s[j+1,1], s[2,2], ..., s[j+1,2], ..., s[j+1,j+1], where s[m,n]
denotes the (m,n) element of the Cholesky decomposition of the error covariance matrix.
Examples
Setup
. webuse laborsup
. ivtobit fem_inc fem_educ kids (other_inc = male_educ), ll
Compute average marginal effects on expected income, conditional on it being greater than 10 (thousand
dollars)
. margins, predict(e(10,.)) dydx(other_inc fem_educ kids)
Estimate separately for women with 8, 12, and 16 years of education
. margins, predict(e(10,.)) dydx(kids) at(fem_educ=(8(4)16))
Plot most recent estimates and confidence intervals
. marginsplot
|