cep.get: Obtain Data Frame to be Used in 'Lopt.get' and...

Description Usage Arguments Value Author(s) References See Also Examples

Description

Returns a data frame containing raw cepstra coefficients and the group membership from multiple time seres.

Usage

1
cep.get(y,x,nw,k)

Arguments

y

n-vector indicating group membership

x

N by n matrix containing n time series, each with length N.

nw

Width of tapers used in multitaper spectral estimation. Default is set to 4

k

Number of tapers used in multitaper spectral estimation. Default is set to 7

Value

D.hat

Data frame containing group information and raw cepstral coefficients.

Author(s)

Zeda Li <zeda.li@temple.edu>

References

Krafty, RT(2016) Discriminant Analysis of Time Series in the Presence of Within-Group Spectral Variability. Journal of Time series analysis

See Also

predict.ceplda, Lopt.get

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Simulate dataset
nj = 50  #number of series in training data
N = 500  #length of time series
data1 <- r.cond.ar2(N=N,nj=nj,r.phi1=c(.01,.7),r.phi2=c(-.12,-.06),r.sig2=c(.3,3))
data2 <- r.cond.ar2(N=N,nj=nj,r.phi1=c(.5,1.2),r.phi2=c(-.36,-.25),r.sig2=c(.3,3))
data3 <- r.cond.ar2(N=N,nj=nj,r.phi1=c(.9,1.5),r.phi2=c(-.56,-.75),r.sig2=c(.3,3))
dat <- cbind(data1$X,data2$X,data3$X)
y <- c(rep(1,nj),rep(2,nj),rep(3,nj))
data.cep <- cep.get(y,dat,4,7)
dim(data.cep)

CepLDA documentation built on May 1, 2019, 6:50 p.m.

Related to cep.get in CepLDA...