help regress postestimation dialogs: predict dfbeta estat
plot dialogs: acprplot avplots cprplot
lvr2plot rvfplot rvpplot
also see: regress
regress postestimation ts
-------------------------------------------------------------------------------
Title
[R] regress postestimation -- Postestimation tools for regress
Description
The following postestimation commands are of special interest after
regress:
command description
-------------------------------------------------------------------------
dfbeta DFBETA influence statistics
estat hettest tests for heteroskedasticity
estat imtest information matrix test
estat ovtest Ramsey regression specification-error test for omitted
variables
estat szroeter Szroeter's rank test for heteroskedasticity
estat vif variance inflation factors for the independent
variables
acprplot augmented component-plus-residual plot
avplot added-variable plot
avplots all added-variable plots in one image
cprplot component-plus-residual plot
lvr2plot leverage-versus-squared-residual plot
rvfplot residual-versus-fitted plot
rvpplot residual-versus-predictor plot
-------------------------------------------------------------------------
These commands are not appropriate after the svy prefix.
The following standard postestimation commands are also available:
command description
-------------------------------------------------------------------------
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
linktest link test for model specification
(1) lrtest likelihood-ratio test
margins marginal means, predictive margins, marginal
effects, and average marginal effects
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
suest seemingly unrelated estimation
test Wald tests of simple and composite linear hypotheses
testnl Wald tests of nonlinear hypotheses
-------------------------------------------------------------------------
(1) lrtest is not appropriate with svy estimation results.
For postestimation tests specific to time series, see [R] regress
postestimation ts.
Special-interest postestimation commands
These commands provide tools for diagnosing sensitivity to individual
observations, analyzing residuals, and assessing specification.
dfbeta will calculate one, more than one, or all the DFBETAs after
regress. Although predict will also calculate DFBETAs, predict can do
this for only one variable at a time. dfbeta is a convenience tool for
those who want to calculate DFBETAs for multiple variables. The names
for the new variables created are chosen automatically and begin with the
letters _dfbeta_.
estat hettest performs three versions of the Breusch-Pagan (1979) and
Cook-Weisberg (1983) test for heteroskedasticity. All three versions of
this test present evidence against the null hypothesis that t=0 in
Var(e)=sigma^2 exp(zt). In the normal version, performed by default, the
null hypothesis also includes the assumption that the regression
disturbances are independent-normal draws with variance sigma^2. The
normality assumption is dropped from the null hypothesis in the iid and
fstat versions, which respectively produce score and F tests. If varlist
is not specified, the fitted values are used for z. If varlist or the
rhs option is specified, the variables specified are used for z.
estat imtest performs an information matrix test for the regression model
and an orthogonal decomposition into tests for heteroskedasticity,
skewness, and kurtosis due to Cameron and Trivedi (1990); White's test
for homoskedasticity against unrestricted forms of heteroskedasticity
(1980) is available as an option. White's test is usually similar to the
first term of the Cameron-Trivedi decomposition.
estat ovtest performs two versions of the Ramsey (1969) regression
specification-error test (RESET) for omitted variables. This test
amounts to fitting y=xb+zt+u and then testing t=0. If the rhs option is
not specified, powers of the fitted values are used for z. If rhs is
specified, powers of the individual elements of x are used.
estat szroeter performs Szroeter's rank test for heteroskedasticity for
each of the variables in varlist or for the explanatory variables of the
regression if rhs is specified.
estat vif calculates the centered or uncentered variance inflation
factors (VIFs) for the independent variables specified in a linear
regression model.
acprplot graphs an augmented component-plus-residual plot (a.k.a.
augmented partial residual plot) as described by Mallows (1986). This
seems to work better than the component-plus-residual plot for
identifying nonlinearities in the data.
avplot graphs an added-variable plot (a.k.a. partial-regression leverage
plot, partial regression plot, or adjusted partial residual plot) after
regress. indepvar may be an independent variable (a.k.a. predictor,
carrier, or covariate) that is currently in the model or not.
avplots graphs all the added-variable plots in one image.
cprplot graphs a component-plus-residual plot (a.k.a. partial residual
plot) after regress. indepvar must be an independent variable that is
currently in the model.
lvr2plot graphs a leverage-versus-squared-residual plot (a.k.a. L-R
plot).
rvfplot graphs a residual-versus-fitted plot, a graph of the residuals
against the fitted values.
rvpplot graphs a residual-versus-predictor plot (a.k.a. independent
variable plot or carrier plot), a graph of the residuals against the
specified predictor.
Syntax for predict
predict [type] newvar [if] [in] [, statistic]
statistic description
-------------------------------------------------------------------------
Main
xb linear prediction; the default
residuals residuals
score score; equivalent to residuals
rstandard standardized residuals
rstudent studentized (jackknifed) residuals
cooksd Cook's distance
leverage | hat leverage (diagonal elements of hat matrix)
pr(a,b) Pr (y | a < y < b)
e(a,b) E(y | a < y < b)
ystar(a,b) E(y*), y* = max(a,min(y,b))
* dfbeta(varname) DFBETA for varname
stdp standard error of the linear prediction
stdf standard error of the forecast
stdr standard error of the residual
* covratio COVRATIO
* dfits DFITS
* welsch Welsch distance
-------------------------------------------------------------------------
Unstarred statistics are available both in and out of sample; type
predict ... if e(sample) ... if wanted only for the estimation sample.
Starred statistics are calculated only for the estimation sample, even
when if e(sample) is not specified.
rstandard, rstudent, cooksd, leverage, dfbeta(), stdf, stdr, covratio,
dfits, and welsch are not available if any vce() other than vce(ols)
was specified with regress.
xb, residuals, score, and stdp are the only options 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.
residuals calculates the residuals.
score is equivalent to residuals in linear regression.
rstandard calculates the standardized residuals.
rstudent calculates the studentized (jackknifed) residuals.
cooksd calculates the Cook's D influence statistic (Cook 1977).
leverage or hat calculates the diagonal elements of the projection hat
matrix.
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, y|x is
censored.
a and b are specified as they are for pr().
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 y* is truncated.
a and b are specified as they are for pr().
dfbeta(varname) calculates the DFBETA for varname, the difference between
the regression coefficient when the jth observation is included and
excluded, said difference being scaled by the estimated standard
error of the coefficient. varname must have been included among the
regressors in the previously fitted model. The calculation is
automatically restricted to the estimation subsample.
stdp calculates the standard error of the prediction, which 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.
stdr calculates the standard error of the residuals.
covratio calculates COVRATIO (Belsley, Kuh, and Welsch 1980), a measure
of the influence of the jth observation based on considering the
effect on the variance-covariance matrix of the estimates. The
calculation is automatically restricted to the estimation subsample.
dfits calculates DFITS (Welsch and Kuh 1977) and attempts to summarize
the information in the leverage versus residual-squared plot into one
statistic. The calculation is automatically restricted to the
estimation subsample.
welsch calculates Welsch distance (Welsch 1982) and is a variation on
dfits. The calculation is automatically restricted to the estimation
subsample.
Syntax for dfbeta
dfbeta [indepvar [indepvar [...]]] [, stub(name)]
Menu
Statistics > Linear models and related > Regression diagnostics >
Residual-versus-fitted plot
Option for dfbeta
stub(name) specifies the leading characters dfbeta uses to name the new
variables to be generated. The default is stub(_dfbeta_).
Syntax for estat hettest
estat hettest [varlist] [, rhs [normal | iid | fstat] mtest[(spec)]]
Menu
Statistics > Postestimation > Reports and statistics
Options for estat hettest
rhs specifies that tests for heteroskedasticity be performed for the
right-hand-side (explanatory) variables of the fitted regression
model. The rhs option may be combined with a varlist.
normal, the default, causes estat hettest to compute the original
Breusch-Pagan/Cook-Weisberg test, which assumes that the regression
disturbances are normally distributed.
iid causes estat hettest to compute the N*R2 version of the score test,
which drops the normality assumption.
fstat causes estat hettest to compute the F-statistic version, which
drops the normality assumption.
mtest[(spec)] specifies that multiple testing be performed. The argument
specifies how p-values are adjusted. The following specifications,
spec, are supported:
bonferroni Bonferroni's multiple testing adjustment
holm Holm's multiple testing adjustment
sidak Sidak's multiple testing adjustment
noadjust no adjustment is made for multiple testing
mtest may be specified without an argument. This is equivalent to
specifying mtest(noadjust); that is, tests for the individual
variables should be performed with unadjusted p-values. By default,
estat hettest does not perform multiple testing. mtest may not be
specified with iid or fstat.
Syntax for estat imtest
estat imtest [, preserve white]
Menu
Statistics > Postestimation > Reports and statistics
Options for estat imtest
preserve specifies that the data in memory be preserved, all variables
and cases that are not needed in the calculations be dropped, and at
the conclusion the original data be restored. This option is costly
for large datasets. However, because estat imtest has to perform an
auxiliary regression on k(k+1)/2 temporary variables, where k is the
number of regressors, it may not be able to perform the test
otherwise.
white specifies that White's original heteroskedasticity test also be
performed.
Syntax for estat ovtest
estat ovtest [, rhs]
Menu
Statistics > Postestimation > Reports and statistics
Option for estat ovtest
rhs specifies that powers of the right-hand-side (explanatory) variables
be used in the test rather than powers of the fitted values.
Syntax for estat szroeter
estat szroeter [varlist] [, rhs mtest(spec)]
Either varlist or rhs must be specified.
Menu
Statistics > Postestimation > Reports and statistics
Options for estat szroeter
rhs specifies that tests for heteroskedasticity be performed for the
right-hand-side (explanatory) variables of the fitted regression
model. The rhs option may be combined with a varlist.
mtest(spec) specifies that multiple testing be performed. The argument
specifies how p-values are adjusted. The following specifications,
spec, are supported:
bonferroni Bonferroni's multiple testing adjustment
holm Holm's multiple testing adjustment
sidak Sidak's multiple testing adjustment
noadjust no adjustment is made for multiple testing
estat szroeter always performs multiple testing. By default, it does
not adjust the p-values.
Syntax for estat vif
estat vif [, uncentered]
Menu
Statistics > Postestimation > Reports and statistics
Option for estat vif
uncentered requests the computation of the uncentered variance inflation
factors. This option is often used to detect the collinearity of the
regressors with the constant. estat vif, uncentered may be used
after regression models fit without the constant term.
Syntax for acprplot
acprplot indepvar [, acprplot_options]
acprplot_options description
-------------------------------------------------------------------------
Plot
marker_options change look of markers (color, size, etc.)
marker_label_options add marker labels; change look or position
Reference line
rlopts(cline_options) affect rendition of the reference line
Options
lowess add a lowess smooth of the plotted points
lsopts(lowess_options) affect rendition of the lowess smooth
mspline add median spline of the plotted points
msopts(mspline_options) affect rendition of the spline
Add plots
addplot(plot) add other plots to the generated graph
Y axis, X axis, Titles, Legend, Overall
twoway_options any options other than by() documented in
[G] twoway_options
-------------------------------------------------------------------------
Menu
Statistics > Linear models and related > Regression diagnostics >
Augmented component-plus-residual plot
Options for acprplot
+------+
----+ Plot +-------------------------------------------------------------
marker_options affect the rendition of markers drawn at the plotted
points, including their shape, size, color, and outline; see [G]
marker_options.
marker_label_options specify if and how the markers are to be labeled;
see [G] marker_label_options.
+----------------+
----+ Reference line +---------------------------------------------------
rlopts(cline_options) affects the rendition of the reference line. See
[G] cline_options.
+---------+
----+ Options +----------------------------------------------------------
lowess adds a lowess smooth of the plotted points to assist in detecting
nonlinearities.
lsopts(lowess_options) affects the rendition of the lowess smooth. For
an explanation of these options, especially the bwidth() option, see
[R] lowess. Specifying lsopts() implies the lowess option.
mspline adds a median spline of the plotted points to assist in detecting
nonlinearities.
msopts(mspline_options) affects the rendition of the spline. For an
explanation of these options, especially the bands() option, see [G]
graph twoway mspline. Specifying msopts() implies the mspline
option.
+-----------+
----+ Add plots +--------------------------------------------------------
addplot(plot) provides a way to add other plots to the generated graph.
See [G] addplot_option.
+-----------------------------------------+
----+ Y axis, X axis, Titles, Legend, Overall +--------------------------
twoway_options are any of the options documented in [G] twoway_options,
excluding by(). These include options for titling the graph (see [G]
title_options) and for saving the graph to disk (see [G]
saving_option).
Syntax for avplot
avplot indepvar [, avplot_options]
avplot_options description
-------------------------------------------------------------------------
Plot
marker_options change look of markers (color, size, etc.)
marker_label_options add marker labels; change look or position
Reference line
rlopts(cline_options) affect rendition of the reference line
Add plots
addplot(plot) add other plots to the generated graph
Y axis, X axis, Titles, Legend, Overall
twoway_options any options other than by() documented in
[G] twoway_options
-------------------------------------------------------------------------
Menu
Statistics > Linear models and related > Regression diagnostics >
Added-variable plot
Options for avplot
+------+
----+ Plot +-------------------------------------------------------------
marker_options affect the rendition of markers drawn at the plotted
points, including their shape, size, color, and outline; see [G]
marker_options.
marker_label_options specify if and how the markers are to be labeled;
see [G] marker_label_options.
+----------------+
----+ Reference line +---------------------------------------------------
rlopts(cline_options) affect the rendition of the reference line. See
[G] cline_options.
+-----------+
----+ Add plots +--------------------------------------------------------
addplot(plot) provides a way to add other plots to the generated graph.
See [G] addplot_option.
+-----------------------------------------+
----+ Y axis, X axis, Titles, Legend, Overall +--------------------------
twoway_options are any of the options documented in [G] twoway_options,
excluding by(). These include the options for titling the graph (see
> [G] title_options) and for saving the graph to disk (see [G]
saving_option).
Syntax for avplots
avplots [, avplots_options]
avplots_options description
-------------------------------------------------------------------------
Plot
marker_options change look of markers (color, size, etc.)
marker_label_options add marker labels; change look or position
combine_options any of the options documented in [G] graph
combine
Reference line
rlopts(cline_options) affect rendition of the reference line
Y axis, X axis, Titles, Legend, Overall
twoway_options any options other than by() documented in
[G] twoway_options
-------------------------------------------------------------------------
Menu
Statistics > Linear models and related > Regression diagnostics >
Added-variable plot
Options for avplots
+------+
----+ Plot +-------------------------------------------------------------
marker_options affect the rendition of markers drawn at the plotted
points, including their shape, size, color, and outline; see [G]
marker_options.
marker_label_options specify if and how the markers are to be labeled;
see [G] marker_label_options.
combine_options are any of the options documented in [G] graph combine.
These include options for titling the graph (see [G] title_options)
and for saving the graph to disk (see [G] saving_option).
+----------------+
----+ Reference line +---------------------------------------------------
rlopts(cline_options) affect the rendition of the reference line. See
[G] cline_options.
+-----------------------------------------+
----+ Y axis, X axis, Titles, Legend, Overall +--------------------------
twoway_options are any of the options documented in [G] twoway_options,
excluding by(). These include the options for titling the graph (see
> [G] title_options) and for saving the graph to disk (see [G]
saving_option).
Syntax for cprplot
cprplot indepvar [, cprplot_options]
cprplot_options description
-------------------------------------------------------------------------
Plot
marker_options change look of markers (color, size, etc.)
marker_label_options add marker labels; change look or position
Reference line
rlopts(cline_options) affect rendition of the reference line
Options
lowess add a lowess smooth of the plotted points
lsopts(lowess_options) affect the rendition of the lowess smooth
mspline add median spline of the plotted points
msopts(mspline_option) affect rendition of the spline
Add plots
addplot(plot) add other plots to the generated graph
Y axis, X axis, Titles, Legend, Overall
twoway_options any options other than by() documented in
[G] twoway_options
-------------------------------------------------------------------------
Menu
Statistics > Linear models and related > Regression diagnostics >
Component-plus-residual plot
Options for cprplot
+------+
----+ Plot +-------------------------------------------------------------
marker_options affect the rendition of markers drawn at the plotted
points, including their shape, size, color, and outline; see [G]
marker_options.
marker_label_options specify if and how the markers are to be labeled;
see [G] marker_label_options.
+----------------+
----+ Reference line +---------------------------------------------------
rlopts(cline_options) affects the rendition of the reference line. See
[G] cline_options.
+---------+
----+ Options +----------------------------------------------------------
lowess adds a lowess smooth of the plotted points to assist in detecting
nonlinearities.
lsopts(lowess_options) affects the rendition of the lowess smooth. For
an explanation of these options, especially the bwidth() option, see
[R] lowess. Specifying lsopts() implies the lowess option.
mspline adds a median spline of the plotted points to assist in detecting
nonlinearities.
msopts(mspline_options) affects the rendition of the spline. For an
explanation of these options, especially the bands() option, see [G]
graph twoway mspline. Specifying msopts() implies the mspline
option.
+-----------+
----+ Add plots +--------------------------------------------------------
addplot(plot) provides a way to add other plots to the generated graph.
See [G] addplot_option.
+-----------------------------------------+
----+ Y axis, X axis, Titles, Legend, Overall +--------------------------
twoway_options are any of the options documented in [G] twoway_options,
excluding by(). These include options for titling the graph (see [G]
title_options) and for saving the graph to disk (see [G]
saving_option).
Syntax for lvr2plot
lvr2plot [, lvr2plot_options]
lvr2plot_options description
-------------------------------------------------------------------------
Plot
marker_options change look of markers (color, size, etc.)
marker_label_options add marker labels; change look or position
Add plots
addplot(plot) add other plots to the generated graph
Y axis, X axis, Titles, Legend, Overall
twoway_options any options other than by() documented in
[G] twoway_options
-------------------------------------------------------------------------
Menu
Statistics > Linear models and related > Regression diagnostics >
Leverage-versus-squared-residual plot
Options for lvr2plot
+------+
----+ Plot +-------------------------------------------------------------
marker_options affect the rendition of markers drawn at the plotted
points, including their shape, size, color, and outline; see [G]
marker_options.
marker_label_options specify if and how the markers are to be labeled;
see [G] marker_label_options.
+-----------+
----+ Add plots +--------------------------------------------------------
addplot(plot) provides a way to add other plots to the generated graph.
See [G] addplot_option.
+-----------------------------------------+
----+ Y axis, X axis, Titles, Legend, Overall +--------------------------
twoway_options are any of the options documented in [G] twoway_options,
excluding by(). These include options for titling the graph (see [G]
title_options) and for saving the graph to disk (see [G]
saving_option).
Syntax for rvfplot
rvfplot [, rvfplot_options]
rvfplot_options description
-------------------------------------------------------------------------
Plot
marker_options change look of markers (color, size, etc.)
marker_label_options add marker labels; change look or position
Add plots
addplot(plot) add plots to the generated graph
Y axis, X axis, Titles, Legend, Overall
twoway_options any options other than by() documented in
[G] twoway_options
-------------------------------------------------------------------------
Menu
Statistics > Linear models and related > Regression diagnostics >
Residual-versus-fitted plot
Options for rvfplot
+------+
----+ Plot +-------------------------------------------------------------
marker_options affect the rendition of markers drawn at the plotted
points, including their shape, size, color, and outline; see [G]
marker_options.
marker_label_options specify if and how the markers are to be labeled;
see [G] marker_label_options.
+-----------+
----+ Add plots +--------------------------------------------------------
addplot(plot) provides a way to add plots to the generated graph. See
[G] addplot_option.
+-----------------------------------------+
----+ Y axis, X axis, Titles, Legend, Overall +--------------------------
twoway_options are any of the options documented in [G] twoway_options,
excluding by(). These include options for titling the graph (see [G]
title_options) and for saving the graph to disk (see [G]
saving_option).
Syntax for rvpplot
rvpplot indepvar [, rvpplot_options]
rvpplot_options description
-------------------------------------------------------------------------
Plot
marker_options change look of markers (color, size, etc.)
marker_label_options add marker labels; change look or position
Add plots
addplot(plot) add plots to the generated graph
Y axis, X axis, Titles, Legend, Overall
twoway_options any options other than by() documented in
[G] twoway_options
-------------------------------------------------------------------------
Menu
Statistics > Linear models and related > Regression diagnostics >
Residual-versus-predictor plot
Options for rvpplot
+------+
----+ Plot +-------------------------------------------------------------
marker_options affect the rendition of markers drawn at the plotted
points, including their shape, size, color, and outline; see [G]
marker_options.
marker_label_options specify if and how the markers are to be labeled;
see [G] marker_label_options.
+-----------+
----+ Add plots +--------------------------------------------------------
addplot(plot) provides a way to add plots to the generated graph. See
[G] addplot_option.
+-----------------------------------------+
----+ Y axis, X axis, Titles, Legend, Overall +--------------------------
twoway_options are any of the options documented in [G] twoway_options,
excluding by(). These include options for titling the graph (see [G]
title_options) and for saving the graph to disk (see [G]
saving_option).
Examples
---------------------------------------------------------------------------
Setup
. sysuse auto
. regress mpg weight c.weight#c.weight foreign
Obtain predicted values
. predict pmpg
. summarize pmpg mpg
---------------------------------------------------------------------------
Setup
. webuse newautos, clear
Obtain out-of-sample prediction
. predict mpg
Obtain standard error of the forecast
. predict se_mpg, stdf
---------------------------------------------------------------------------
Setup
. sysuse auto, clear
. regress price weight foreign##c.mpg
Residual-versus-fitted plot
. rvfplot, yline(10)
Added-variable plot
. avplot mpg
Added-variable plots for every regressor
. avplots
---------------------------------------------------------------------------
Setup
. webuse auto1, clear
. regress price mpg weight
Component-plus-residual plot
. cprplot mpg, mspline msopts(bands(13))
Augmented component-plus-residual plot
. acprplot mpg, mspline msopts(bands(13))
Residual-versus-predictor plot
. rvpplot mpg, yline(0)
---------------------------------------------------------------------------
Setup
. sysuse auto
. regress mpg weight c.weight#c.weight foreign
Diagonal elements of projection matrix
. predict xdist, hat
---------------------------------------------------------------------------
Setup
. sysuse auto, clear
. regress price weight foreign##c.mpg
Leverage-versus-residual-squared plot
. lvr2plot
Standardized residuals
. predict esta if e(sample), rstandard
Studentized residuals
. predict estu if e(sample), rstudent
---------------------------------------------------------------------------
Setup
. sysuse auto, clear
. regress price weight foreign##c.mpg
DFITS influence measure
. predict dfits, dfits
Cook's distance
. predict cooksd if e(sample), cooksd
Welsch distance
. predict wd, welsch
COVRATIO influence measure
. predict covr, covratio
DFBETAs influence measure
. sort foreign make
. predict dfor, dfbeta(foreign)
DFBETAs for all variables in regression
. dfbeta
Ramsey's test for omitted variables
. estat ovtest
Test for heteroskedasticity
. estat hettest
. estat hettest weight foreign##c.mpg, mtest(b)
Rank test for heteroskedasticity
. estat szroeter, rhs mtest(holm)
Tests for heteroskedasticity, skewness, and kurtosis
. estat imtest
---------------------------------------------------------------------------
Setup
. webuse bodyfat, clear
. regress bodyfat tricep thigh midarm
Variance inflation factors
. estat vif
---------------------------------------------------------------------------
Saved results
estat hettest saves the following results for the (multivariate) score
test in r():
Scalars
r(chi2) chi-squared test statistic
r(df) #df for the asymptotic chi-squared distribution under
H_0
r(p) p-value
estat hettest, fstat saves the results for the (multivariate) score test
in r():
Scalars
r(F) test statistic
r(df_m) #df of the test for the F distribution under H_0
r(df_r) #df of the residuals for the F distribution under H_0
r(p) p-value
estat hettest (if mtest is specified) and estat szroeter save the
following in r():
Matrices
r(mtest) a matrix of test results, with rows corresponding to the
univariate tests
mtest[.,1] chi-squared test statistic
mtest[.,2] #df
mtest[.,3] unadjusted p-value
mtest[.,4] adjusted p-value (if an mtest() adjustment
method is specified)
Macros
r(mtmethod) adjustment method for p-value
estat imtest saves the following in r():
Scalars
r(chi2_t) IM-test statistic (= r(chi2_h) + r(chi2_s) + r(chi2_k))
r(df_t) df for limiting chi-squared distribution under H_0 (=
r(df_h) + r(df_s) + r(df_k))
r(chi2_h) heteroskedasticity test statistic
r(df_h) df for limiting chi-squared distribution under H_0
r(chi2_s) skewness test statistic
r(df_s) df for limiting chi-squared distribution under H_0
r(chi2_k) kurtosis test statistic
r(df_k) df for limiting chi-squared distribution under H_0
r(chi2_w) White's heteroskedasticity test (if white specified)
r(df_w) df for limiting chi-squared distribution under H_0
estat ovtest saves the following in r():
Scalars
r(p) two-sided p-value
r(F) F statistic
r(df) degrees of freedom
r(df_r) residual degrees of freedom
References
Belsley, D. A., E. Kuh, and R. E. Welsch. 1980. Regression Diagnostics:
Identifying Influential Data and Sources of Collinearity. New York:
Wiley.
Breusch, T. S., and A. R. Pagan. 1979. A simple test for
heteroscedasticity and random coefficient variation. Econometrica 47:
1287-1294.
Cameron, A. C., and P. K. Trivedi. 1990. The information matrix test and
its applied alternative hypotheses. Working Paper 372, University of
California-Davis, Institute of Governmental Affairs.
Cook, R. D. 1977. Detection of influential observations in linear
regression. Technometrics 19: 15-18.
Cook, R. D., and S. Weisberg. 1983. Diagnostics for heteroscedasticity
in regression. Biometrika 70: 1-10.
Mallows, C. L. 1986. Augmented partial residuals. Technometrics 28:
313-319.
Ramsey, J. B. 1969. Tests for specification errors in classical linear
least-squares regression analysis. Journal of the Royal Statistical
Society, Series B 31: 350-371.
Welsch, R. E. 1982. Influence functions and regression diagnostics. In
Modern Data Analysis, ed. R. L. Launer and A. F. Siegel, 149-169.
New York: Academic Press.
Welsch, R. E., and E. Kuh. 1977. Linear Regression Diagnostics.
Technical Report 923-77, Massachusetts Institute of Technology,
Cambridge, MA.
White, H. 1980. A heteroskedasticity-consistent covariance matrix
estimator and a direct test for heteroskedasticity. Econometrica 48:
817-838.
Also see
Manual: [R] regress postestimation
Help: [R] regress, [R] regress postestimation time series