EVOLUTION-MANAGER
Edit File: lag.plot.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Time Series Lag Plots</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for lag.plot {stats}"><tr><td>lag.plot {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Time Series Lag Plots</h2> <h3>Description</h3> <p>Plot time series against lagged versions of themselves. Helps visualizing ‘auto-dependence’ even when auto-correlations vanish. </p> <h3>Usage</h3> <pre> lag.plot(x, lags = 1, layout = NULL, set.lags = 1:lags, main = NULL, asp = 1, diag = TRUE, diag.col = "gray", type = "p", oma = NULL, ask = NULL, do.lines = (n <= 150), labels = do.lines, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>time-series (univariate or multivariate)</p> </td></tr> <tr valign="top"><td><code>lags</code></td> <td> <p>number of lag plots desired, see arg <code>set.lags</code>.</p> </td></tr> <tr valign="top"><td><code>layout</code></td> <td> <p>the layout of multiple plots, basically the <code>mfrow</code> <code><a href="../../graphics/html/par.html">par</a>()</code> argument. The default uses about a square layout (see <code><a href="../../grDevices/html/n2mfrow.html">n2mfrow</a></code>) such that all plots are on one page.</p> </td></tr> <tr valign="top"><td><code>set.lags</code></td> <td> <p>vector of positive integers allowing specification of the set of lags used; defaults to <code>1:lags</code>.</p> </td></tr> <tr valign="top"><td><code>main</code></td> <td> <p>character with a main header title to be done on the top of each page.</p> </td></tr> <tr valign="top"><td><code>asp</code></td> <td> <p>Aspect ratio to be fixed, see <code><a href="../../graphics/html/plot.default.html">plot.default</a></code>.</p> </td></tr> <tr valign="top"><td><code>diag</code></td> <td> <p>logical indicating if the x=y diagonal should be drawn.</p> </td></tr> <tr valign="top"><td><code>diag.col</code></td> <td> <p>color to be used for the diagonal <code>if(diag)</code>.</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>plot type to be used, but see <code><a href="plot.ts.html">plot.ts</a></code> about its restricted meaning.</p> </td></tr> <tr valign="top"><td><code>oma</code></td> <td> <p>outer margins, see <code><a href="../../graphics/html/par.html">par</a></code>.</p> </td></tr> <tr valign="top"><td><code>ask</code></td> <td> <p>logical or <code>NULL</code>; if true, the user is asked to confirm before a new page is started.</p> </td></tr> <tr valign="top"><td><code>do.lines</code></td> <td> <p>logical indicating if lines should be drawn.</p> </td></tr> <tr valign="top"><td><code>labels</code></td> <td> <p>logical indicating if labels should be used.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Further arguments to <code><a href="plot.ts.html">plot.ts</a></code>. Several graphical parameters are set in this function and so cannot be changed: these include <code>xlab</code>, <code>ylab</code>, <code>mgp</code>, <code>col.lab</code> and <code>font.lab</code>: this also applies to the arguments <code>xy.labels</code> and <code>xy.lines</code>.</p> </td></tr> </table> <h3>Details</h3> <p>If just one plot is produced, this is a conventional plot. If more than one plot is to be produced, <code>par(mfrow)</code> and several other graphics parameters will be set, so it is not (easily) possible to mix such lag plots with other plots on the same page. </p> <p>If <code>ask = NULL</code>, <code>par(ask = TRUE)</code> will be called if more than one page of plots is to be produced and the device is interactive. </p> <h3>Note</h3> <p>It is more flexible and has different default behaviour than the S version. We use <code>main =</code> instead of <code>head = </code> for internal consistency. </p> <h3>Author(s)</h3> <p>Martin Maechler</p> <h3>See Also</h3> <p><code><a href="plot.ts.html">plot.ts</a></code> which is the basic work horse. </p> <h3>Examples</h3> <pre> require(graphics) lag.plot(nhtemp, 8, diag.col = "forest green") lag.plot(nhtemp, 5, main = "Average Temperatures in New Haven") ## ask defaults to TRUE when we have more than one page: lag.plot(nhtemp, 6, layout = c(2,1), asp = NA, main = "New Haven Temperatures", col.main = "blue") ## Multivariate (but non-stationary! ...) lag.plot(freeny.x, lags = 3) ## no lines for long series : lag.plot(sqrt(sunspots), set = c(1:4, 9:12), pch = ".", col = "gold") </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>