-------------------------------------------------------------------------------
help for rvpplot27
-------------------------------------------------------------------------------

Graph residual-versus-predictor plot after regression-type command

rvpplot27 varname [, residualtype force scale(exp) ksm(ksm_options) graph_options]

rvpplot27 is for use after regress and similar commands; see help on the command of interest. It is a generalisation of official Stata's rvpplot, except for different defaults for the l1title() option.

Description

rvpplot27 graphs a residual-versus-predictor plot (a.k.a. independent variable plot, a.k.a. carrier plot), a graph of the residuals versus the specified predictor varname from the last regression-type model. The residuals are, by default, those calculated by predict, residuals or (if the previous estimation command was glm) by predict, response. This is a clone of rvpplot2 1.0.0 for users of Stata 7. Users of Stata 8 should use rvpplot2 2.0.0 or later.

Options

residualtype specifies a type of residual other than the default. The following types are currently supported: anscombe, deviance, likelihood, pearson, residuals, response, rstandard, rstudent, score, working.

force allows you to specify a predictor variable not included in the previous model.

scale(exp) specifies a transformed scale on which to show the residuals using Stata syntax and X as a placeholder for the residual variable name. Thus scale(X^2) specifies squaring, to show relative contribution to residual variance; scale(abs(X)) specifies absolute value, to set aside sign; scale(sqrt(abs(X))) specifies root of absolute value, a useful scale on which to check for heteroscedasticity.

ksm(ksm_options) specifies that the residuals will be smoothed as a function of the predictor using ksm with the options named.

graph_options are any of the options allowed with graph, twoway. See help on grtwoway.

Examples

. reg width length . rvpplot27 length . glm price weight, link(log) . rvpplot27 weight, anscombe yli(0)

Author

Nicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk Acknowledgements

Kit Baum identified an error in a previous version of this help.

Also see

Manual: [R] regression diagnostics On-line: help for graph, regdiag; predict