sdt: Serial Dependence Test Objects and Dependograms

sdtR Documentation

Serial Dependence Test Objects and Dependograms

Description

Objects of class "sdt" are returned by dcor_serial_test(), hsic_serial_test() and dacf_curve(). They contain components for lagwise dependence measures, which can be plotted as dependograms using plot(). The objects returned by the two tests also inherit from class "htest".

Usage

## S3 method for class 'sdt'
plot(
  x,
  type = c("bar", "line"),
  xlab = "Lag",
  ylab = NULL,
  main = NULL,
  add_h0 = TRUE,
  pch = 19,
  lty = 1,
  ...
)

Arguments

x

An object of class "sdt".

type

Type of dependogram. Either "bar" for a barplot or "line" for a line plot.

xlab

Label for the x-axis.

ylab

Label for the y-axis. If omitted, a default based on the stored dependence measure is used.

main

Main title. If omitted, a default title is used.

add_h0

Logical; if TRUE, add a horizontal reference line at zero.

pch

Plotting character used for type = "line".

lty

Line type used for type = "line".

...

Further arguments passed to graphics::barplot() or graphics::plot().

Details

The objects returned by the two tests contain the usual "htest" components. All objects of class "sdt" contain:

estimate

Named vector of lagwise dependence values.

lags

Integer vector of lags used.

measure_name

Character string naming the dependence measure, for example "dCor" or "HSIC".

The plot method displays the lagwise dependence values either as a barplot or as a line plot. For kernel-weighted tests such as type = "H96", the plot shows the unweighted lagwise dependence values, not the weighted contributions to the test statistic.

Value

The plot method is called for its side effect of producing a plot and returns the object invisibly.

Examples

x <- as.numeric(arima.sim(list(ar = 0.6), n = 100))
fit <- dcor_serial_test(x, B = 99, lags = 1:10)
plot(fit)

fit2 <- hsic_serial_test(x, B = 99, lags = 1:10)
plot(fit2, type = "line")


dcorBSS documentation built on Nov. 10, 2026, 5:07 p.m.