check_acf: Check for autocorrelation

Description Usage Arguments Value Examples

View source: R/check_acf.R

Description

Ljung-Box tests for given lags

Usage

1
check_acf(data, level = 0.05, lag_grid = c(8, 12, 16))

Arguments

data

a numeric vector or univariate time series object

level

significance level

lag_grid

vector of lags to test on

Value

list with data.frames of p-values for both Ljung-Box and Box-Pierce tests results and logical vector pass which is TRUE if all tests passes and FALSE otherwise

Examples

1
2
3
4
5
6
7
apple <- tsRNN::ts_apple

# With all default
check_acf(apple)

# Significance level to 0.01 and 1 to 5 lags
check_acf(apple, level = 0.01, lag_grid = 1:5)

thfuchs/fcf documentation built on April 18, 2021, 1:43 p.m.