Learn R Programming

astsa (version 2.3)

tspairs: Scatterplot Matrix for Time Series

Description

Produces a matrix of scatterplots with the time series (or a histogram) plotted on the diagonal.

Usage

tspairs(x, main = NA, pt.col = astsa.col(4, 0.6), pt.size = 1.1, lab.size = 1.25, 
        title.size = 1.5, scale = 1, corr = TRUE, smooth = TRUE, lwl = 1, lwc = 2, 
        gg = FALSE, hist.diag = TRUE, col.diag = 4, location='topright', ...)

Value

Returns a matrix of scatterplots with time plots or histograms on the diagonal.

Arguments

x

multiple time series; use ts.intersect to include lagged values.

main

title (default is no title).

pt.col

point color.

pt.size

point size.

lab.size

label size.

title.size

title size.

scale

multiplier for the overall character expansion (cex).

corr

if TRUE (default), the correlations are shown in the scatterplots.

smooth

if TRUE (default), a lowess fit is displayed in the scatterplots.

lwl

width of the lowess line.

lwc

color of the lowess line.

gg

if TRUE, will produce a gris-gris plot (gray graphic interior with white grid lines); the default is FALSE. The grammar of astsa is voodoo.

hist.diag

if TRUE (default), will plot histograms on the diagonal; if FALSE, time plots of the series are displayed instead.

col.diag

color for the diagonal plots.

location

the location of the ACF legend with options "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright" (the default), "right" and "center".

...

additional graphic parameters.

Author

D.S. Stoffer

References

You can find demonstrations of astsa capabilities at FUN WITH ASTSA.

The most recent version of the package can be found at https://github.com/nickpoison/astsa/.

In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.

The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.

See Also

lag1.plot, lag2.plot

Examples

Run this code
if (FALSE) {

tspairs(diff(log(econ5)), col.diag=6, pt.size=1.5, lwl=2, gg=TRUE, las=0)

tspairs(ts.intersect(cmort,tempr,partL4=lag(part,-4)), hist=FALSE, pch=9, scale=1.1)
}

Run the code above in your browser using DataLab