sim_parAcvf {pcts} | R Documentation |
Create a random periodic autocovariance function
Description
Select randomly a periodic autoregression model and return the periodic autocovariances associated with it.
Usage
sim_parAcvf(period, order, sigma2)
Arguments
period |
the period, a positive integer. |
order |
the AR order, a vector of non-negative integers. |
sigma2 |
the variances of the innovations, a numeric vector of
length |
Details
Uses sim_parCoef()
to generate a random PAR model.
Value
an object of class "matrix". In addition, the specification of the
model is in attribute "model"
which is a list with the
following components:
ar |
a matrix, the coefficients of the PAR model, |
sigma2 |
numeric, the innovation variances, |
order |
the PAR order. |
Author(s)
Georgi N. Boshnakov
References
Boshnakov GN, Iqelan BM (2009). “Generation of time series models with given spectral properties.” J. Time Series Anal., 30(3), 349–368. ISSN 0143-9782, doi:10.1111/j.1467-9892.2009.00617.x.
Examples
sim_parAcvf(2, 5)
sim_parAcvf(3, 5)
res <- sim_parAcvf(2, 6)
res
slMatrix(res)[3, 4, type = "tt"]
res <- sim_parAcvf(2, 4)
attr(res, "model")
acv <- res[ , ] # drop attributes
acv[2, 1 + 0]
acv[2, 1 + 1]
slMatrix(acv)[2, 0]
slMatrix(acv)[2, 1]
slMatrix(acv)[3, 4, type = "tt"]
slMatrix(acv)[1:2, 1:2, type = "tt"]
slMatrix(acv)[1:4, 1:4, type = "tt"]
## TODO: need method for autocorrelation()
## pc.acrf(acv)
## TODO: these need changing, after the change of the return values of sim_parAcvf
## pc.fcoeffs(acv, 2)
## pc.fcoeffs(acv, 3)
## pc.fcoeffs(acv, 4)
pcts:::calc_predictionCoefficients(acv, c(2, 2))
pcts:::calc_predictionCoefficients(acv, c(3, 3))
pcts:::calc_predictionCoefficients(acv, c(4, 4))