lag.plot                 package:ts                 R Documentation

_T_i_m_e _S_e_r_i_e_s _L_a_g _P_l_o_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Plot time series against lagged versions of themselves. Helps
     visualizing "auto-dependence" even when auto-correlations vanish.

_U_s_a_g_e:

     lag.plot(x, lags = 1, layout = NULL, set.lags = 1:lags,
              main = NULL, asp = 1,
              font.main=par("font.main"), cex.main=par("cex.main"),
              diag = TRUE, diag.col="gray", type="p", oma =NULL, ask =NULL,
              do.lines = n <= 150, labels = do.lines, ...)

_A_r_g_u_m_e_n_t_s:

       x: time-series (univariate or multivariate)

    lags: number of lag plots desired, see arg 'set.lags'.

  layout: the layout of multiple plots, basically the 'mfrow' 'par()'
          argument.  The default uses about a square layout (see
          'n2mfrow' such that all plots are on one page.

set.lags: positive integer vector allowing to specify the set of lags
          used; defaults to '1:lags'.

    main: character with a main header title to be done on the top of
          each page.

     asp: Aspect ratio to be fixed, see 'plot.default'.

font.main, cex.main: attributes for the title, see 'par()'.

    diag: logical indicating if the x=y diagonal should be drawn.

diag.col: color to be used for the diagonal 'if(diag)'.

    type: plot type to be used, but see 'plot.ts' about its restricted
          meaning.

     oma: outer margins, see 'par'.

     ask: logical; if true, the user is asked before a new page is
          started.

do.lines: logical indicating if lines should be drawn.

  labels: logical indicating if labels should be used.

     ...: Further arguments to 'plot.ts'.

_N_o_t_e:

     It is more flexible and has different default behaviour than the S
     version.  We use 'main =' instead of 'head = ' for internal
     consistency.

_A_u_t_h_o_r(_s):

     Martin Maechler

_S_e_e _A_l_s_o:

     'plot.ts' which is the basic work horse.

_E_x_a_m_p_l_e_s:

     data(nhtemp)
     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! ...)
     data(freeny)
     lag.plot(freeny.x, lag = 3)
     ## Don't run: 
     data(sunspots) # no lines for long series :
     lag.plot(sqrt(sunspots), set = c(1:4, 9:12), pch = ".", col = "gold")
     ## End Don't run

