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
|
m |
integer scalar giving the underlying level of dependency. |
d |
numeric vector giving the weights used in difference-based
estimation method. Only pertinent when |
type |
character string specifying whether covariance (default) or correlation must be computed. |
order |
character specifying whether a |
plot |
logical. If |
... |
further arguments passed to |
Value
An object of class "dbacf" containing:
acf |
numeric vector of length |
m |
integer giving underlying level of dependency. |
d |
numeric vector containing the weights used to estimate acf. |
acfType |
string indicating whether |
n |
integer giving |
series |
string with name of variable |
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
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")