Recompute Covariance Estimate for fracdiff
fracdiff.var.RdAllows the finite-difference interval to be altered for recomputation of the
covariance estimate for fracdiff.
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.
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))
#>
#> Call:
#> fracdiff(x = ts.test$ser, nar = 1, nma = 1)
#>
#> Coefficients:
#> d ar ma
#> 0.3083096 0.2349120 0.4722493
#> sigma[eps] = 0.9912793
#> a list with components:
#> [1] "log.likelihood" "n" "msg" "d"
#> [5] "ar" "ma" "covariance.dpq" "fnormMin"
#> [9] "sigma" "stderror.dpq" "correlation.dpq" "h"
#> [13] "d.tol" "M" "hessian.dpq" "length.w"
#> [17] "residuals" "fitted" "call"
## looks identical as print(fd.out),
## however these (e.g.) differ :
vcov(fd.out)
#> d ar1 ma1
#> d 0.0003974321 0.0003298583 0.0007207965
#> ar1 0.0003298583 0.0017109169 0.0018731806
#> ma1 0.0007207965 0.0018731806 0.0025178704
vcov(fd.o2)
#> d ar1 ma1
#> d 0.0002622546 0.0002176645 0.0004756339
#> ar1 0.0002176645 0.0016177989 0.0016697020
#> ma1 0.0004756339 0.0016697020 0.0020732351
## 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
#>
#> Call:
#> fracdiff(x = X <- fracdiff.sim(n = 100, d = 0.25)$series)
#>
#> Coefficients:
#> d
#> 0.1140946
#> sigma[eps] = 0.8891445
#> a list with components:
#> [1] "log.likelihood" "n" "msg" "d"
#> [5] "ar" "ma" "covariance.dpq" "fnormMin"
#> [9] "sigma" "stderror.dpq" "correlation.dpq" "h"
#> [13] "d.tol" "M" "hessian.dpq" "length.w"
#> [17] "residuals" "fitted" "call"
# Confidence intervals just based on asymp.normal approx. and std.errors:
confint(fdc) # ridiculously too narrow
#> 2.5 % 97.5 %
#> d 0.1140919 0.1140973