Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fracdiff.var

Recompute Covariance Estimate for fracdiff


Description

Allows the finite-difference interval to be altered for recomputation of the covariance estimate for fracdiff.

Usage

fracdiff.var(x, fracdiff.out, h)

Arguments

x

a univariate time series or a vector. Missing values (NAs) are not allowed.

fracdiff.out

output from fracdiff for time series x.

h

finite-difference interval for approximating partial derivatives with respect to the d parameter.

Value

an object of S3 class "fracdiff", i.e., basically a list with the same elements as the result from fracdiff, but with possibly different values for the hessian, covariance, and correlation matrices and for standard error, as well as for h.

See Also

fracdiff, also for references.

Examples

## Generate a fractionally-differenced ARIMA(1,d,1) model :
ts.test <- fracdiff.sim(10000, ar = .2, ma = .4, d = .3)
## estimate the parameters in an ARIMA(1,d,1) model for the simulated series
fd.out <- fracdiff(ts.test$ser, nar= 1, nma = 1)

## Modify the covariance estimate by changing the finite-difference interval
(fd.o2 <- fracdiff.var(ts.test$series, fd.out, h = .0001))
## looks identical as  print(fd.out),
## however these (e.g.) differ :
vcov(fd.out)
vcov(fd.o2)

## A case, were the default variance is *clearly* way too small:
set.seed(1); fdc <- fracdiff(X <- fracdiff.sim(n=100,d=0.25)$series)
fdc
# Confidence intervals just based on asymp.normal approx. and std.errors:
confint(fdc) # ridiculously too narrow

fracdiff

Fractionally Differenced ARIMA aka ARFIMA(P,d,q) Models

v1.5-1
GPL (>= 2)
Authors
Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Chris Fraley [ctb, cph] (S original; Fortran code), Friedrich Leisch [ctb] (R port, <https://orcid.org/0000-0001-7278-1983>), Valderio Reisen [ctb] (fdGPH() & fdSperio()), Artur Lemonte [ctb] (fdGPH() & fdSperio()), Rob Hyndman [ctb] (residuals() & fitted(), <https://orcid.org/0000-0002-2140-5352>)
Initial release
2020-01-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.