Stata 15 help for lvr2plot

[R] regress postestimation diagnostic plots -- Postestimation plots for regress (View complete PDF manual entry)

Description

The following postestimation commands are of special interest after regress:

Command Description ------------------------------------------------------------------------- rvfplot residual-versus-fitted plot avplot added-variable plot avplots all added-variable plots in one image cprplot component-plus-residual plot acprplot augmented component-plus-residual plot rvpplot residual-versus-predictor plot lvr2plot leverage-versus-squared-residual plot ------------------------------------------------------------------------- These commands are not appropriate after the svy prefix.

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-3] twoway_options -------------------------------------------------------------------------

Menu for rvfplot

Statistics > Linear models and related > Regression diagnostics > Residual-versus-fitted plot

Description for rvfplot

rvfplot graphs a residual-versus-fitted plot, a graph of the residuals against the fitted values.

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-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

+-----------+ ----+ Add plots +--------------------------------------------------------

addplot(plot) provides a way to add plots to the generated graph. See [G-3] addplot_option.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] 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-3] twoway_options -------------------------------------------------------------------------

Menu for avplot

Statistics > Linear models and related > Regression diagnostics > Added-variable plot

Description for avplot

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.

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-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

+----------------+ ----+ Reference line +---------------------------------------------------

rlopts(cline_options) affects the rendition of the reference line. See [G-3] cline_options.

+-----------+ ----+ Add plots +--------------------------------------------------------

addplot(plot) provides a way to add other plots to the generated graph. See [G-3] addplot_option.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] 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-2] 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-3] twoway_options -------------------------------------------------------------------------

Menu for avplots

Statistics > Linear models and related > Regression diagnostics > Added-variable plot

Description for avplots

avplots graphs all the added-variable plots in one image.

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-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

combine_options are any of the options documented in [G-2] graph combine. These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] saving_option).

+----------------+ ----+ Reference line +---------------------------------------------------

rlopts(cline_options) affects the rendition of the reference line. See [G-3] cline_options.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] 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 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-3] twoway_options -------------------------------------------------------------------------

Menu for cprplot

Statistics > Linear models and related > Regression diagnostics > Component-plus-residual plot

Description for cprplot

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.

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-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

+----------------+ ----+ Reference line +---------------------------------------------------

rlopts(cline_options) affects the rendition of the reference line. See [G-3] 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-2] 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-3] addplot_option.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] saving_option).

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-3] twoway_options -------------------------------------------------------------------------

Menu for acprplot

Statistics > Linear models and related > Regression diagnostics > Augmented component-plus-residual plot

Description for acprplot

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.

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-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

+----------------+ ----+ Reference line +---------------------------------------------------

rlopts(cline_options) affects the rendition of the reference line. See [G-3] 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-2] 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-3] addplot_option.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] 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-3] twoway_options -------------------------------------------------------------------------

Menu for rvpplot

Statistics > Linear models and related > Regression diagnostics > Residual-versus-predictor plot

Description for rvpplot

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.

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-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

+-----------+ ----+ Add plots +--------------------------------------------------------

addplot(plot) provides a way to add plots to the generated graph. See [G-3] addplot_option.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] 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-3] twoway_options -------------------------------------------------------------------------

Menu for lvr2plot

Statistics > Linear models and related > Regression diagnostics > Leverage-versus-squared-residual plot

Description for lvr2plot

lvr2plot graphs a leverage-versus-squared-residual plot (a.k.a. L-R 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-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

+-----------+ ----+ Add plots +--------------------------------------------------------

addplot(plot) provides a way to add other plots to the generated graph. See [G-3] addplot_option.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] saving_option).

Examples

--------------------------------------------------------------------------- Setup . sysuse auto . 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 . 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 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

---------------------------------------------------------------------------

Reference

Mallows, C. L. 1986. Augmented partial residuals. Technometrics 28: 313-319.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index