Many Methods for "fracdiff" Objects
fd-methods.RdMany “accessor” methods for fracdiff objects,
notably summary, coef, vcov, and
logLik; further print() methods were needed.
Usage
# S3 method for class 'fracdiff'
coef(object, ...)
# S3 method for class 'fracdiff'
logLik(object, ...)
# S3 method for class 'fracdiff'
print(x, digits = getOption("digits"), ...)
# S3 method for class 'fracdiff'
summary(object, symbolic.cor = FALSE, ...)
# S3 method for class 'summary.fracdiff'
print(x, digits = max(3, getOption("digits") - 3),
correlation = FALSE, symbolic.cor = x$symbolic.cor,
signif.stars = getOption("show.signif.stars"), ...)
# S3 method for class 'fracdiff'
fitted(object, ...)
# S3 method for class 'fracdiff'
residuals(object, ...)
# S3 method for class 'fracdiff'
vcov(object, ...)Arguments
- x, object
object of class
fracdiff.- digits
the number of significant digits to use when printing.
- ...
further arguments passed from and to methods.
- correlation
logical; if
TRUE, the correlation matrix of the estimated parameters is returned and printed.- symbolic.cor
logical. If
TRUE, print the correlations in a symbolic form (seesymnum) rather than as numbers.- signif.stars
logical. If
TRUE, “significance stars” are printed for each coefficient.
Author
Martin Maechler; Rob Hyndman contributed the
residuals() and fitted() methods.
See also
fracdiff to get "fracdiff" objects,
confint.fracdiff for the confint method;
further, fracdiff.var.
Examples
set.seed(7)
ts4 <- fracdiff.sim(10000, ar = c(0.6, -.05, -0.2), ma = -0.4, d = 0.2)
modFD <- fracdiff( ts4$series, nar = length(ts4$ar), nma = length(ts4$ma))
#> Warning: unable to compute correlation matrix; maybe change 'h'
## -> warning (singular Hessian) %% FIXME ???
coef(modFD) # the estimated parameters
#> d ar1 ar2 ar3 ma
#> 0.18574785 0.60448721 -0.02589436 -0.21820311 -0.41066512
vcov(modFD)
#> d ar1 ar2 ar3 ma1
#> d 3.948926e-06 -5.861285e-07 -1.543319e-07 -1.320697e-06 2.842259e-06
#> ar1 -5.861285e-07 -2.612427e-06 -2.661677e-05 2.804338e-05 -2.883319e-05
#> ar2 -1.543319e-07 -2.661677e-05 1.222974e-04 8.663898e-06 6.348246e-05
#> ar3 -1.320697e-06 2.804338e-05 8.663898e-06 -1.066487e-05 4.522663e-06
#> ma1 2.842259e-06 -2.883319e-05 6.348246e-05 4.522663e-06 1.007082e-04
smFD <- summary(modFD)
smFD
#>
#> Call:
#> fracdiff(x = ts4$series, nar = length(ts4$ar), nma = length(ts4$ma))
#>
#> *** Warning during (fdcov) fit: unable to compute correlation matrix; maybe change 'h'
#>
#> Coefficients:
#> Estimate
#> d 0.186
#> ar1 0.604
#> ar2 -0.026
#> ar3 -0.218
#> ma -0.411
#> sigma[eps] = 1.006018
#> [d.tol = 0.0001221, M = 100, h = 0.0001501]
#> Log likelihood: -1.425e+04 ==> AIC = 28510.24 [6 deg.freedom]
coef(smFD) # gives the whole table
#> Estimate
#> d 0.18574785
#> ar1 0.60448721
#> ar2 -0.02589436
#> ar3 -0.21820311
#> ma -0.41066512
AIC(modFD) # AIC works because of the logLik() method
#> [1] 28510.24
stopifnot(exprs = {
})