📄 regress_postestimation.hlp
字号:
{smcl}
{* 28mar2005}{...}
{cmd:help regress postestimation} {right:dialogs: {bf:{dialog regres_p:predict}} {bf:{dialog dfbeta}} {bf:{dialog regress_estat:estat}} }
{right:plot dialogs: {bf:{dialog acprplot}} {bf:{dialog avplot:avplots}} {bf:{dialog cprplot}}}
{right:{bf:{dialog lvr2plot}} {bf:{dialog rvfplot}} {bf:{dialog rvpplot}}}
{right:also see: {helpb regress}{space 19}}
{right:{help regress postestimation ts} }
{hline}
{title:Title}
{p2colset 5 35 37 2}{...}
{p2col :{hi:[R] regress postestimation} {hline 2}}Postestimation tools
for regress{p_end}
{p2colreset}{...}
{title:Description}
{pstd}
The following postestimation commands are of special interest after {cmd:regress}:
{synoptset 17}{...}
{p2coldent :command}description{p_end}
{synoptline}
{synopt :{helpb regress postestimation##dfbeta:dfbeta}}DFBETA influence statistics{p_end}
{synopt :{helpb regress postestimation##estathett:estat hettest}}tests for heteroskedasticity{p_end}
{synopt :{helpb regress postestimation##estatimtest:estat imtest}}information matrix test{p_end}
{synopt :{helpb regress postestimation##estatovt:estat ovtest}}Ramsey regression specification error test for
omitted variables{p_end}
{synopt :{helpb regress postestimation##estatszroeter:estat szroeter}}Szroeter's rank test for heteroskedasticity{p_end}
{synopt :{helpb regress postestimation##estatvif:estat vif}}variance inflation factors for the independent
variables{p_end}
{synopt :{helpb regress postestimation##acprplot:acprplot}}augmented component-plus-residual plot{p_end}
{synopt :{helpb regress postestimation##avplot:avplot}}added-variable plot{p_end}
{synopt :{helpb regress postestimation##avplot:avplots}}all added-variable plots in a single image{p_end}
{synopt :{helpb regress postestimation##cprplot:cprplot}}component-plus-residual plot{p_end}
{synopt :{helpb regress postestimation##lvr2plot:lvr2plot}}leverage-versus-squared-residual plot{p_end}
{synopt :{helpb regress postestimation##rvfplot:rvfplot}}residual-versus-fitted plot{p_end}
{synopt :{helpb regress postestimation##rvpplot:rvpplot}}residual-versus-predictor plot{p_end}
{synoptline}
{p2colreset}{...}
{pstd}
In addition, the following standard postestimation commands are available:
{synoptset 17}{...}
{p2coldent :command}description{p_end}
{synoptline}
INCLUDE help post_adjust1
INCLUDE help post_estat
INCLUDE help post_estimates
INCLUDE help post_hausman
INCLUDE help post_lincom
INCLUDE help post_linktest
INCLUDE help post_lrtest
INCLUDE help post_mfx
INCLUDE help post_nlcom
{synopt :{helpb regress postestimation##predict:predict}}predictions,
residuals, influence statistics, and other diagnostic measures{p_end}
INCLUDE help post_predictnl
INCLUDE help post_suest
INCLUDE help post_test
INCLUDE help post_testnl
{synoptline}
{p2colreset}{...}
{p 4 6 2}For postestimation tests specific to time series, see
{help regress postestimation ts}.
{title:Special-interest postestimation commands}
{pstd}
These commands provide tools for diagnosing sensitivity to individual
observations, analyzing residuals, and assessing specification.
{pstd}
{opt dfbeta} will calculate one, more than one, or all the DFBETAs after
{helpb regress}. Although {opt predict} will also calculate DFBETAs,
{helpb predict} can do this for only one variable at a time. {opt 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 DF.
{pstd}
{opt estat hettest} performs two flavors of the Breusch-Pagan and Cook and
Weisberg test for heteroskedasticity. This test amounts to testing
{bind:t=0 in Var(e)=rho^2 exp(zt)}. If {varlist} is not specified, the
fitted values are used for z. If {it:varlist} or the option {opt rhs} is
specified, the variables specified are used for z.
{pstd}
{opt 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; White's test for
homoskedasticity against unrestricted forms of heteroskedasticity is available
as an option. White's test is usually very similar to the first term of the
Cameron-Trivedi decomposition.
{pstd}
{opt estat ovtest} performs two flavors of the Ramsey regression specification
error test (RESET) for omitted variables. This test amounts to fitting
{bind:y=xb+zt+u} and then testing {bind:t=0}. If option {opt rhs} is not
specified, powers of the fitted values are used for z. If {opt rhs} is
specified, powers of the individual elements of x are used.
{pstd}
{opt 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 {opt rhs} is specified.
{pstd}
{opt estat vif} calculates the variance inflation factors (VIFs) for the
independent variables specified in a linear regression model.
{pstd}
{opt avplot} graphs an added-variable plot (a.k.a. partial-regression leverage
plot, partial regression plot, or adjusted partial residual plot) after
{cmd:regress}. {it:indepvar} may be an independent variable (a.k.a.
predictor, carrier, or covariate) that is currently in the model or not.
{pstd}
{opt avplots} graphs all the added-variable plots in a single image.
{pstd}
{opt cprplot} graphs a component-plus-residual plot (a.k.a. partial residual
plot) after {cmd:regress}. {it:indepvar} must be an independent variable that
is currently in the model.
{pstd}
{opt acprplot} graphs an augmented component-plus-residual plot (a.k.a.
augmented partial residual plot) as described by Mallows. This seems to work
better than the component-plus-residual plot for identifying nonlinearities in
the data.
{pstd}
{opt lvr2plot} graphs a leverage-versus-squared-residual plot (a.k.a. L-R
plot).
{pstd}
{opt rvfplot} graphs a residual-versus-fitted plot, a graph of the residuals
against the fitted values.
{pstd}
{opt 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.
{marker predict}{...}
{title:Syntax for predict}
{p 8 19 2}
{cmd:predict} {dtype} {newvar} {ifin} [{cmd:,} {it:statistic}]
{marker statistic}{...}
{synoptset 19 tabbed}{...}
{synopthdr:statistic}
{synoptline}
{syntab:Main}
{synopt :{opt xb}}xb, fitted values; the default{p_end}
{synopt :{opt r:esiduals}}residuals{p_end}
{synopt :{opt sc:ore}}score; equivalent to {opt residuals}{p_end}
{synopt :{opt rsta:ndard}}standardized residuals{p_end}
{synopt :{opt rstu:dent}}studentized (jackknifed) residuals{p_end}
{synopt :{opt c:ooksd}}Cook's distance{p_end}
{synopt :{opt l:everage} | {opt h:at}}leverage (diagonal elements of
hat matrix){p_end}
{synopt :{opt p:r}{cmd:(}{it:a}{cmd:,}{it:b}{cmd:)}}Pr (y | {it:a} < y < {it:b}){p_end}
{synopt :{opt e(a,b)}}E(y | {it:a} < y < {it:b}){p_end}
{synopt :{opt ys:tar(a,b)}}E(y*), y* = max{cmd:(}{it:a},min(y,{it:b}{cmd:)}{p_end}
{p2coldent:* {opth dfb:eta(varname)}}DFBETA for {it:varname}{p_end}
{synopt :{opt stdp}}standard error of the prediction{p_end}
{synopt :{opt stdf}}standard error of the forecast{p_end}
{synopt :{opt stdr}}standard error of the residual{p_end}
{p2coldent:* {opt cov:ratio}}COVRATIO{p_end}
{p2coldent:* {opt dfi:ts}}DFITS{p_end}
{p2coldent:* {opt w:elsch}}Welsch distance{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}Unstarred statistics are available both in and out of sample;
{cmd:type predict ... if e(sample) ...} if wanted only for the estimation
sample. Starred statistics are calculated only for the estimation sample,
even when if {cmd:e(sample)} is not specified.{p_end}
{p 4 6 2}{it:a} and {it:b} may be numbers or variables; {it:a} missing
{bind:{cmd:(}{it:a} {ul:>} {cmd:.)}} means minus infinity, and {it:b} missing
{bind:{cmd:(}{it:b} {ul:>} {cmd:.)}} means plus infinity; see
{help missing:missing values}.{p_end}
{p 4 6 2}{opt cooksd}, {opt leverage}, {opt rstandard}, {opt rstudent},
{opt stdf}, {opt stdr}, {opt covratio}, {opt dfbeta()}, {opt dfits},
and {opt welsch} are not available if {opt robust}, {opt cluster()},
{opt hc2}, or {opt hc3} were specified with {cmd:regress}.
{title:Options for predict}
{dlgtab:Main}
{phang}
{opt xb}, the default, calculates the linear prediction.
{phang}
{opt residuals} calculates the residuals.
{phang}
{opt score} is equivalent to {opt residuals} in linear regression.
{phang}
{opt rstandard} calculates the standardized residuals.
{phang}
{opt rstudent} calculates the studentized (jackknifed) residuals.
{phang}
{opt cooksd} calculates Cook's D influence statistic.
{phang}
{opt leverage} or {opt hat} calculates the diagonal elements of the
projection hat matrix.
{phang}
{cmd:pr(}{it:a}{cmd:,}{it:b}{cmd:)} calculates the
{bind:Pr({it:a} < xb+u < {it:b})}, the probability that y|x would be observed
in the interval ({it:a},{it:b}).
{pmore}
{it:a} and {it:b} may be specified as numbers or variable names;
lb and ub are variable names;{break}
{cmd:pr(20,30)} calculates {bind:Pr(20 < xb+u < 30)};{break}
{cmd:pr(lb,ub)} calculates {bind:Pr(lb < xb+u < ub)};{break}
and {cmd:pr(20,ub)} calculates {bind:Pr(20 < xb+u < ub)}.
{pmore}
{it:a} missing {bind:({it:a} {ul:>} .)} means minus infinity;
{cmd:pr(.,30)} calculates {bind:Pr(xb+u < 30)};{break}
{cmd:pr(lb,30)} calculates {bind:Pr(xb+u < 30)} in observations for which
{bind:lb {ul:>} .}{break}
and calculates {bind:Pr(lb < xb+u < 30)} elsewhere.
{pmore}
{it:b} missing {bind:({it:b} {ul:>} .)} means plus infinity;
{cmd:pr(20,.)} calculates {bind:Pr(xb+u > 20)};{break}
{cmd:pr(20,ub)} calculates {bind:Pr(xb+u > 20)} in observations for which
{bind:ub {ul:>} .}{break}
and calculates {bind:Pr(20 < xb+u < ub)} elsewhere).
{phang}
{cmd:e(}{it:a}{cmd:,}{it:b}{cmd:)} calculates
{bind:E(xb+u | {it:a} < xb+u < {it:b})}, the expected value of y|x conditional
on y|x being in the interval ({it:a},{it:b}), meaning, y|x is censored.{break}
{it:a} and {it:b} are specified as they are for {cmd:pr()}.
{phang}
{cmd:ystar(}{it:a}{cmd:,}{it:b}{cmd:)} calculates E(y*),
where {bind:y* = {it:a}} if {bind:xb+u {ul:<} {it:a}}, {bind:y* = {it:b}} if
{bind:xb+u {ul:>} {it:b}}, and {bind:y* = xb+u} otherwise, meaning y* is
truncated.{break}
{it:a} and {it:b} are specified as they are for {cmd:pr()}.
{phang}
{opth dfbeta(varname)} calculates the DFBETA for {it: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. {it:varname} must have been included among the regressors in the
previously fitted model. The calculation is automatically restricted to the
estimation subsample.
{phang}
{opt 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. This is also referred to as the standard
error of the fitted value.
{phang}
{opt stdf} calculates the standard error of the forecast, which is the
standard error of the point prediction for a single observation. It is
commonly referred to as the standard error of the future or forecast value.
By construction, the standard errors produced by {opt stdf} are always larger
than those produced by {opt stdp}.
{phang}
{opt stdr} calculates the standard error of the residuals.
{phang}
{opt covratio} calculates COVRATIO, 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.
{phang}
{opt dfits} calculates DFITS and attempts to summarize the information in the
leverage versus residual-squared plot into a single statistic. The
calculation is automatically restricted to the estimation subsample.
{phang}
{opt welsch} calculates Welsch Distance and is a variation on {opt dfits}.
The calculation is automatically restricted to the estimation subsample.
{marker dfbeta}{...}
{title:Syntax for dfbeta}
{p 8 18 2}
{cmd:dfbeta} [{it:{help indepvars:indepvar}} [{it:{help indepvars:indepvar}} [...]]]
{marker estatovt}{...}
{title:Syntax for estat ovtest}
{p 8 17 2}
{cmd:estat} {opt ovt:est} [{cmd:,} {opt r:hs}]
{title:Option for estat ovtest}
{phang}
{opt rhs} specifies that powers of the right-hand-side (explanatory) variables
be used in the test rather than powers of the fitted values.
{marker estathett}{...}
{title:Syntax for estat hettest}
{p 8 17 2}
{cmd:estat} {opt hett:est} [{varlist}]
[{cmd:,} {opt r:hs} {opt m:test}[{cmd:(}{it:spec}{cmd:)}]]
{title:Options for estat hettest}
{phang}
{opt rhs} specifies that tests for heteroskedasticity be performed for the
right-hand-side (explanatory) variables of the fitted regression model.
Option {opt rhs} may be combined with a {varlist}.
{phang}
{opt mtest}[{cmd:(}{it:spec}{cmd:)}] specifies that multiple testing be
performed. The argument specifies how p-values are adjusted. The following
specifications {it:spec} are supported:
{opt b:onferroni} Bonferroni's multiple testing adjustment
{opt h:olm} Holm's multiple testing adjustment
{opt s:idak} Sid{c a'}k's multiple testing adjustment
{opt noadj:ust} no adjustment is made for multiple testing
{pmore}
{opt mtest} may be specified without an argument. This is equivalent to
specifying {cmd:mtest(noadjust)}, that is, tests for the individual variables
should be performed with unadjusted p-values. By default, {opt estat hettest}
does not perform multiple testing.
{marker estatszroeter}{...}
{title:Syntax for estat szroeter}
{p 8 17 2}
{cmd:estat} {opt szr:oeter} [{varlist}]
[{cmd:,} {opt r:hs} {opt m:test}{cmd:(}{it:spec}{cmd:)}]
{title:Options for estat szroeter}
{phang}
{opt rhs} specifies that tests for heteroskedasticity be performed for the
right-hand-side (explanatory) variables of the fitted regression model.
Option {opt rhs} may be combined with a {varlist}.
{phang}
{opt mtest}[{cmd:(}{it:spec}{cmd:)}] specifies that multiple testing be
performed. The argument specifies how p-values are adjusted. The following
specifications {it:spec} are supported:
{opt b:onferroni} Bonferroni's multiple testing adjustment
{opt h:olm} Holm's multiple testing adjustment
{opt s:idak} Sid{c a'}k's multiple testing adjustment
{opt noadj:ust} no adjustment is made for multiple testing
{pmore}
{opt estat szroeter} always performs multiple testing. By default, it does
not adjust the p-values.
{marker estatvif}{...}
{title:Syntax for estat vif}
{p 8 17 2}
{cmd:estat vif}
{marker estatimtest}{...}
{title:Syntax for estat imtest}
{p 8 17 2}
{cmd:estat} {opt emt:est} [{cmd:,} {opt p:reserve} {opt wh:ite}]
{title:Options for estat imtest}
{phang}
{opt 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 is costly for large datasets.
However, as {opt 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.
{phang}
{opt white} specifies that White's original heteroskedasticity test also be
performed.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -