plot_acf: Plot Autocorrelation Function (ACF) or Partial...

View source: R/tseries-plots.R

plot_acfR Documentation

Plot Autocorrelation Function (ACF) or Partial Autocorrelation Function (PACF) Values

Description

Plot Autocorrelation Function (ACF) or Partial Autocorrelation Function (PACF) Values

Usage

plot_acf(
  .data,
  .color = "black",
  .conf_color = "blue",
  .title = "ACF Plot",
  .origin_width = 1,
  .conf_width = 0.5
)

## S3 method for class 'data.frame'
plot_acf(
  .data,
  .color = "black",
  .conf_color = "blue",
  .title = "ACF Plot",
  .origin_width = 1,
  .conf_width = 0.5
)

plot_pacf(
  .data,
  .color = "black",
  .conf_color = "blue",
  .title = "PACF Plot",
  .origin_width = 1,
  .conf_width = 0.5
)

## S3 method for class 'data.frame'
plot_pacf(
  .data,
  .color = "black",
  .conf_color = "blue",
  .title = "PACF Plot",
  .origin_width = 1,
  .conf_width = 0.5
)

Arguments

.data

The output of calculate_acf() or calculate_pacf().

.color

(Optional) The color of the plot's bars. Default is black.

.conf_color

(Optional) The color of the confidence interval lines. Default is blue.

.title

(Optional) The title for the plot.

.origin_width

(Optional) The width of the line at y = 0.

.conf_width

(Optional) The width of the confidence interval lines.

Value

A ggplot object.

See Also

calculate_acf() calculate_pacf()

Examples

library(tidytest)

x <- rnorm(100)

#> ACF
acf_tbl <- calculate_acf(x)
plot_acf(acf_tbl)

#> PACF
pacf_tbl <- calculate_pacf(x)
plot_pacf(pacf_tbl)


RobbyLankford/tidytest documentation built on Jan. 27, 2024, 7:36 a.m.