pc_sdfactor | R Documentation |
Compute a matrix of factors such that elementwise division of the periodic autocovariance matrix by it will give the periodic autocorrelations.
pc_sdfactor(sd, maxlag)
sd |
standard deviations of the seasons numeric. |
maxlag |
maximal lag, a number. |
a matrix of coefficients of size period x (maxlag+1)
. The
length of sd
is taken to be the period.
Georgi N. Boshnakov
autocorrelations
## equivalent to data(Fraser, package = "pear")
Fraser <- window(Fraser2017, start = c(1912, 3), end = c(1990, 12))
logfraser <- window(pcts(log(Fraser)), start = c(1913, 1))
acvf1 <- autocovariances(logfraser, maxlag = 2)
fac <- pc_sdfactor(sqrt(acvf1[ , 0]), 2)
fac[ , 1:3]
acrf1 <- autocorrelations(logfraser, maxlag = 2)
all.equal(acvf1[], acrf1[] * fac) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.