------------------------------------------------------------------------------- help forrvpplot27-------------------------------------------------------------------------------

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

rvpplot27varname[,residualtypeforcescale(exp)ksm(ksm_options)graph_options]

rvpplot27is for use afterregressand similar commands; see help on the command of interest. It is a generalisation of official Stata'srvpplot, except for different defaults for thel1title()option.

Description

rvpplot27graphs a residual-versus-predictor plot (a.k.a. independent variable plot, a.k.a. carrier plot), a graph of the residuals versus the specified predictorvarnamefrom the last regression-type model. The residuals are, by default, those calculated bypredict, residualsor (if the previous estimation command wasglm) bypredict, response. This is a clone ofrvpplot21.0.0 for users of Stata 7. Users of Stata 8 should uservpplot22.0.0 or later.

Options

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

forceallows 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 andXas a placeholder for the residual variable name. Thusscale(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 usingksmwith the options named.

graph_optionsare any of the options allowed withgraph, twoway. See help on grtwoway.

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

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

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

Also seeManual:

[R] regression diagnosticsOn-line: help for graph, regdiag; predict