Description Usage Arguments Details Value Author(s) See Also Examples
This function is based on the acf function and extends it by allowing for some transformations of the data before computing the autocovariance or autocorrelation function.
1 2 |
wts |
a univariate time series object. |
transf.type |
a character string indicating what transformation should be applied to the data. Allowed values are "orig", "fdiff", "sdiff", "fsdiff", "fdiffsd", "perdiff", and ""perdiffsd. See details. |
perdiff.coeffs |
a vector with the estimates coefficients for the periodic difference filter. This argument is only required when the periodic difference transformation must be applied to the data. See details. |
type |
a character string giving the type of acf to be computed. Allowed values are "correlation", "covariance" or "partial". |
lag.max |
maximum number of lags at which to calculate the acf. |
showcat |
a logical. If TRUE, the results are printed in detail. If FALSE, the results are stored as a list object. |
plot |
a logical. If TRUE, a plot of the acf is showed. |
The implemented transformations are the following:
"orig": Original series.
"fdiff": First differences of the original series.
"sdiff": Seasonal differences of the original series.
"fsdiff": Fisrt and seasonal differences of the original series.
"fdiffsd": Residuals of the first differences on four seasonal dummy variables.
"perdiff": Periodic differences of the original series.
"perdiffsd": Residuals of the periodic differences on four seasonal dummy variables.
Lags at which the acf is computed, estimates of the acf, and p-values for the significance of the acf at each lag.
Javier Lopez-de-Lacalle javlacalle@yahoo.es.
acf
.
1 2 3 4 5 6 7 8 9 10 11 | ## Logarithms of the Real GNP in Germany
data("gergnp")
lgergnp <- log(gergnp, base=exp(1))
out <- acf.ext1(wts=lgergnp, transf.type="orig",
type="correlation", lag.max=12, showcat=TRUE, plot=FALSE)
out <- acf.ext1(wts=lgergnp, transf.type="perdiffsd",
perdiff.coeff = c(1.004, 0.981, 1.047, 0.969),
type="correlation", lag.max=12, showcat=TRUE, plot=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.