dbacf {dbacf}R Documentation

Difference-based (auto)covariance/correlation function estimation

Description

Computes and by default plots the (auto)covariance/correlation function estimate without pre-estimating the underlying piecewise constant signal of the observations. To that end, a class of second-order difference-based estimators is implemented according to Eqs.(2.5)-(2.6) of Tecuapetla-Gómez and Munk (2017). By default, this function computes a subclass of estimates with minimal bias according to Eqs.(2.12)-(2.14) of the aforementioned paper.

Usage

dbacf(
  data,
  m,
  d,
  type = c("covariance", "correlation"),
  order = c("second", "first"),
  plot = TRUE,
  ...
)

Arguments

data

numeric vector or a univariate object of class ts of length at least 2(m + 1).

m

integer scalar giving the underlying level of dependency.

d

numeric vector giving the weights used in difference-based estimation method. Only pertinent when order=second. If missing, the weights d are calculated according to Eqs.(2.12)-(2.14) of Tecuapetla-Gómez and Munk (2017). When a single value d^\ast is specified, d = rep(d^\ast, m + 1).

type

character string specifying whether covariance (default) or correlation must be computed.

order

character specifying whether a first (default) or a second difference-based estimate should be employed.

plot

logical. If TRUE (default) the acf is plotted.

...

further arguments passed to plot.dbacf.

Value

An object of class "dbacf" containing:

acf

numeric vector of length m + 1 giving estimated (auto)covariance-correlation.

m

integer giving underlying level of dependency.

d

numeric vector containing the weights used to estimate acf.

acfType

string indicating whether covariance or correlation has been computed.

n

integer giving length(data).

series

string with name of variable data.

Note

Although the theoretical properties of the methods implemented in this function were derived for change point regression with stationary Gaussian m-dependent errors, these methods have proven robust against non-normality of the errors and as efficient as other methods in which pre-estimation of an underlying smooth signal is required. For further details see Section 6 of Tecuapetla-Gómez and Munk (2017).

The first-order difference-based estimator was implemented following Eqs.(4)-(5) of Levine and Tecuapetla-Gómez (2023). For the robustness of this estimator see Section 4 of the just mentioned paper.

References

Tecuapetla-Gómez, I and Munk, A. (2017). Autocovariance estimation in regression with a discontinuous signal and m-dependent errors: A difference-based approach. Scandinavian Journal of Statistics, 44(2), 346–368.

Levine, M. and Tecuapetla-Gómez, I. (2023). Autocovariance function estimation via difference schemes for a semiparametric change point model with m-dependent errors. Submitted.

See Also

acf, plot.dbacf

Examples

ma2 <- arima.sim(n = 50, model = list(ma = c(0.4, -0.4), order = c(0, 0, 2)), 
                 sd = 0.25)
dbacf(data=ma2, m = 2)
dbacf(data=ma2, m = 2, order="first")
 

[Package dbacf version 0.2.8 Index]