Plot residuals vs lagged residuals for time series data
rvlrplot [ , residualtype qualifier scatter_options plot(plot) ]
Description
rvlrplot plots residuals from the last model versus lagged (i.e. lag 1) residuals. Data must have been tsset previously.
By default, residuals are whatever predict, res produces after a model. The plot is restricted to the estimation sample.
Remarks
The correlation between residuals and lagged residuals is calculated quietly. This may be retrieved by return list and then (say) used in a second pass giving the correlation on the graph.
If the order of observations is meaningful, but data have not been tsset, this may be done by
gen t = _n tsset t
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.
qualifier specifies one of standardized, studentized, modified, adjusted.
scatter_options are options of twoway scatter.
plot(plot) provides a way to add other plots to the generated graph; see plot_option.
Examples
. tsset time . regress whatever time . rvlrplot
Author
Nicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk
Also see
On-line: help for predict, scatter, tsset, modeldiag