lb.test: The Ljung-Box Test for Uncorrelated Data

View source: R/auxtests.R

lb.testR Documentation

The Ljung-Box Test for Uncorrelated Data

Description

This function is a convenient wrapper for using Box.test to perform the Ljung- Box Q test of uncorrelated data without having to specify ‘⁠type⁠’. In other words, lb.test(x, ...) is equivalent to Box.test(x, type="Ljung-Box", ...).

Usage

lb.test(x, ...)

Arguments

x

a numeric vector or univariate time series.

...

parameters to pass to Box.test.

Value

A list with class "htest" containing the following components:

statistic

the value of the test statistic.

parameter

the degrees of freedom of the approximate chi-squared distribution of the test statistic (taking fitdf into account).

p.value

the p-value of the test.

method

a character string indicating what type of test was performed.

data.name

a character string giving the name of the data.

Author(s)

Andrew Hart and Servet Martínez

See Also

Box.test, markov.test, diid.test diffsign.test, turningpoint.test, rank.test

Examples

#Generate an IID standard normal sequence
n <- rnorm(1000)
lb.test(n)

spgs documentation built on Oct. 3, 2023, 5:07 p.m.