Box.Ljung.Test: Ljung-Box Test Plot

Description Usage Arguments Details Value References See Also Examples

View source: R/box_ljung_test.R

Description

Plots the p-values Ljung-Box test.

Usage

1
Box.Ljung.Test(z, lag = NULL, main = NULL)

Arguments

z

(type: numeric) data vector

lag

(type: numeric) the number of periods for the autocorrelation

main

(type: character) a title for the returned plot

Details

The Ljung-Box test is used to check if exists autocorrelation in a time series. The statistic is

q = n(n+2)\cdot∑_{j=1}^h \hat{ρ}(j)^2/(n-j)

with n the number of observations and \hat{ρ}(j) the autocorrelation coefficient in the sample when the lag is j. LSTS_lbtp computes q and returns the p-values graph with lag j.

Value

A ggplot object.

References

For more information on theoretical foundations and estimation methods see \insertRefbrockwell2002introductionLSTS \insertRefljung1978measureLSTS

See Also

periodogram

Examples

1

LSTS documentation built on July 29, 2021, 5:07 p.m.

Related to Box.Ljung.Test in LSTS...