tsp.correlogram: correlogram plot from a time series

View source: R/tsp.correlogram.R

tsp.correlogramR Documentation

correlogram plot from a time series

Description

Plot Acf, Pacf and Portmanteau test for ts or arima class object

Usage

tsp.correlogram(
  x,
  type = c("Ljung-Box", "Box-Pierce"),
  lag.max = NA,
  table = TRUE,
  seasonal = FALSE
)

Arguments

x

ts or Arima object

type

type of portmanteau test to use. "Ljung-Box" (default) and "Box-Pierce" are allowed.

lag.max

lag max used in acf, pacf and portmanteau test. If lag.max is NA (default), lag.max = 10 for non seasonal ts or Arima residual and 2*frequency(m) for seasonal ts or Arima residual.

table

logical. if TRUE (default) a table is displayed

seasonal

if TRUE (default) acf and pacf plot show seasonal lag color different from regular lag

Details

plot Acf, Pacf and portmanteau test for a time series object (ts class) or Arima residual (Arima class) created with Arima() or arima(). If x is Arima class object, residual are used to plot, and fitdf inside portmanteau test is fitted to: lag-length(x$coef). If table = TRUE, a table with number of lag, acf and pacf values is displayed, with Q stat, degree of freedom and p-value for portmanteau test.

Author(s)

VĂ­ctor Espinoza

See Also

ts arima Box.test Arima Acf Pacf checkresiduals


espher1987/tseries.plot documentation built on Nov. 2, 2022, 5:48 p.m.