Function loglikec
, given phi
, del
, theta
encoded in ptvec
, evaluates the logarithm of likelihood function from the
PARMA series. Procedure returns also values of the AIC, FPE, BIC information criteria and MSE of residuals,
what enables to examine residuals and evaluate godness of model fit.
loglikec(ptvec, x, conpars)
list of values:
logarithm of likehood function (nagative value).
value of AIC criterion.
value of FPE criterion.
value of BIC criterion.
vector of parameters for PARMA(p,q) model, containing matrix parameters
phi
(of size \(T \times p\)), del
(of size \(T \times 1\)),
theta
(of size \(T \times q\)) as following
ptvec = [phi[,1],...,phi[,p],del,theta[,1], ...,theta[,q]]
.
input time series.
vector of parameters [T, p, q, stype]
,
T_t
period of PC-T structure,
p, q
maximum PAR and PMA order, respectively,
stype
numeric parameter connected with covariance matrix computation, so far should be equal to 0 to use procedure
R_w_ma
(see R_w_ma
description). In the future also other values of stype
will be available for
full covariance matrix computation.
Harry Hurd
In this procedure first series x
is filtered by matrix coefficients phi
, del
, theta
.
The code to compute logarithm of likelihood function must includes
the computation of covariance matrix from the parameters phi
, del
, theta
.
Since the inverse of the computed covariance is needed for computing the likelihood,
and it is sometimes ill conditioned (or even singular),
the condition is improved by removing rows and columns corresponding to very small eigenvalues.
This corresponds to removing input data that is highly linearly dependent on the remaining
input data. The procedure contains a threshold ZTHRS (which current value is 10*eps
) that governs the discarding of rows and column corresponding to small eigenvalues (these are determined by a Cholesky decomposition). Any eigenvalue smaller than the threshold has its row and column deleted from the matrix. Then the
inverse and the likelihood are computed from the reduced rank covariance matrix.
Box, G. E. P., Jenkins, G. M., Reinsel, G. (1994), Time Series Analysis, 3rd Ed., Prentice-Hall,
Englewood Cliffs, NJ.
Brockwell, P. J., Davis, R. A. (1991), Time Series: Theory and Methods, 2nd Ed., Springer: New York.
Vecchia, A., (1985), Maximum Likelihood Estimation for Periodic Autoregressive Moving Average Models, Technometrics, v. 27, pp.375-384.
Vecchia, A., (1985), Periodic autoregressive-moving average (PARMA) modeling with applications to water resources, Water Resources
Bulletin, v. 21, no. 5.
R_w_ma
, parmafil
## Do not run
## It could take a few seconds
# \donttest{
data(volumes)
pmean<-permest(t(volumes),24, 0.05, NaN,'volumes', pp=0)
xd=pmean$xd
estimators<-perYW(volumes,24,2,NaN)
estvec=c(estimators$phi[,1],estimators$phi[,2],estimators$del)
loglikec(estvec,xd,c(24,2,0,0))
# }
Run the code above in your browser using DataLab