ljung_box_test: Ljung-Box Test for Autocorrelation

ljung_box_testR Documentation

Ljung-Box Test for Autocorrelation

Description

Functions to perform the Ljung-Box test for autocorrelation.

Usage

ljung_box(v, lags = -1, fit_dof = 0)

Arguments

v

A numeric vector.

lags

A single integer value.

fit_dof

A single integer value.

Value

A two-element numeric vector containing the test statistic and the p-value.

See Also

Boost Documentation for more details on the mathematical background.

Examples

# Ljung-Box test for autocorrelation
ljung_box(c(1, 2, 3, 4, 5), lags = 2, fit_dof = 0)

boostmath documentation built on Dec. 15, 2025, 5:07 p.m.