Toep.estimator {vstdct} | R Documentation |
Toeplitz Covariance and Precision Matrix Estimator
Description
Estimates the Toeplitz covariance matrix, the inverse matrix and the spectral density from a sample of n
i.i.d. p
-dimensional vectors with mean zero.
Usage
Toep.estimator(y, Te, q, method, f.true = NULL)
Arguments
y |
|
Te |
number of bins for data binning. |
q |
penalization order, |
method |
to select the smoothing parameter of the smoothing spline. Available methods are restricted maxmimum likelihodd " |
f.true |
Te-dimensional vector with the true spectral density function evaluated at equi-sapced points in [0, |
Value
A list containing the following elements:
toep
:p
-dim. Toeplitz covariance matrixtoep.inv
:p
-dim. precision matrixacf
:p
-dim. vector with the covariance functionsdf
:p
-dim. vector with the spectral density in the interval [0,1]
Examples
#EXAMPLE 1: Simulate Gaussian ARMA(2,2)
library(nlme)
library(MASS)
p=100
n=1
Sigma=1.44*corMatrix(Initialize(corARMA(c(0.7, -0.4,-0.2, 0.2),p=2,q=2),data=diag(1:p)))
Y=matrix(mvrnorm(n, mu=numeric(p), Sigma=Sigma),n,p)
fit.toep=Toep.estimator(y=Y,Te=10,q=2,method="GCV")$toep
#EXAMPLE 2: AQUAPORIN DATA
data(aquaporin)
n=length(aquaporin$Y)
y.train=aquaporin$Y[1:(0.01*n)]
y.train=y.train-mean(y.train)
fit.toep=Toep.estimator(y=y.train,Te=10,q=1,method="ML")$toep