plot.ACF: Plot Auto-Covariance and Correlation Functions

Description Usage Arguments Author(s) Examples

View source: R/ACF.R

Description

The function plots the output of the theo_acf and ACF functions (autocovariance or autocorrelation functions).

Usage

1
2
3
4
## S3 method for class 'ACF'
plot(x, xlab = NULL, ylab = NULL, show.ci = TRUE,
  alpha = NULL, col_ci = NULL, transparency = NULL, main = NULL,
  parValue = NULL, ...)

Arguments

x

An "ACF" object output from theo_acf or ACF.

xlab

A string indicating the label of the x axis: the default name is 'Lags'.

ylab

A string indicating the label of the y axis: the default name is 'ACF'.

show.ci

A bool indicating whether to show the confidence region. Defaults to TRUE.

alpha

A double indicating the level of significance for the confidence interval. By default alpha = 0.05 which gives a 1 - alpha = 0.95 confidence interval.

col_ci

A string that specifies the color of the region covered by the confidence intervals (confidence region).

transparency

A double between 0 and 1 indicating the transparency level of the color defined in col_ci. Defaults to 0.25.

main

A string indicating the title of the plot. Default name is "Variable name ACF plot'.

parValue

A vector defining the margins for the plot.

...

Additional parameters

Author(s)

Yunxiang Zhang, Stéphane Guerrier and Yuming Zhang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Calculate the Autocorrelation
m = ACF(datasets::AirPassengers)

# Plot with 95% CI
plot(m) 

# Plot with 90% CI
plot(m, alpha = 0.1) 

# Plot without 95% CI
plot(m, show.ci = FALSE)

# More customized CI
plot(m, xlab = "my xlab", ylab = "my ylab", show.ci = TRUE,
alpha = NULL, col_ci = "grey", transparency = 0.5, main = "my main")

SMAC-Group/simts documentation built on Oct. 20, 2018, 8:20 p.m.