ACVS {sapa} | R Documentation |
Calculates the autocovariance sequence for an input time series.
ACVS(x, biased=TRUE, center=TRUE)
x |
a numeric vector representing a uniformly sampled real-valued time series. |
biased |
a logical value. If TRUE , the biased estimator (normalized by N, the number of samples in the time series) is returned.
If FALSE , the result is the unbiased estimator (the kth ACVS value is normalized by N - |k| for
the unbiased case where k=0,...,N-1). Default: TRUE . |
center |
a logical value. If TRUE , the series is first centered (sample mean is subtracted
from series) prior to calculating the ACVS. Default: TRUE . |
a numeric vector containing the single-sided ACVS for lags k=0,...,N-1 where N is the length of the input time series.
SDF
.
## calculate the ACVS for an N(0,1) realization plot(seq(0,99), ACVS(rnorm(100)), type="l", lwd=2, xlab="lag",ylab="ACVS(rnorm(100))") gridOverlay()