Toep.estimator | R Documentation |
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.
Toep.estimator(y, Te, q, method, f.true = NULL)
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, |
A list containing the following elements:
toep
: p
-dim. Toeplitz covariance matrix
toep.inv
: p
-dim. precision matrix
acf
: p
-dim. vector with the covariance function
sdf
: p
-dim. vector with the spectral density in the interval [0,1]
#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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.