Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the list of the variance vectors in terms of the scale of the wavelet decomposition.
1 2 3 | const.var.list(data.mat, names.data = 0, method = "modwt", wf = "la8",
n.levels = 4, boundary = "periodic", save.wave = FALSE,
export.data = FALSE)
|
data.mat |
matrix containing the data time series. Each column of the matrix represents one time series. |
names.data |
optional character vector containing the name associated to the column of the matrix |
method |
wavelet decomposition to be used, algorithm implemented in the |
wf |
name of the wavelet filter to use in the decomposition. By default
this is set to |
n.levels |
specifies the depth of the decomposition. This must be a number less than or equal to log(length(x),2). |
boundary |
Character string specifying the boundary condition. If
|
save.wave |
logical. If TRUE all the wavelet coefficient are saved. |
export.data |
logical. If TRUE the variance vectors with the upper and lower bound are exported to text file. |
This function uses the wavelet decomposition implemented in the R package waveslim
, (whitcher, 2000).
Object of class "Wave Variance"
, basically, a list with the following
components
d? |
Variance vectors for each scale of the wavelet decomposition. |
lowerd? |
vector containing the lower bound of the variance for each scale of the wavelet decomposition. |
upperd? |
vector containing the upper bound of the variance for each scale of the wavelet decomposition. |
S. Achard
Gencay, R., F. Selcuk and B. Whitcher (2001) An Introduction to Wavelets and Other Filtering Methods in Finance and Economics, Academic Press.
Percival, D. B. and A. T. Walden (2000) Wavelet Methods for Time Series Analysis, Cambridge University Press.
S. Achard, R. Salvador, B. Whitcher, J. Suckling, Ed Bullmore (2006) A Resilient, Low-Frequency, Small-World Human Brain Functional Network with Highly Connected Association Cortical Hubs. Journal of Neuroscience, Vol. 26, N. 1, pages 63-72.
const.cor.list
, read.var.txt
, save.var.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | data(brain)
brain<-as.matrix(brain)
# WARNING : To process only the first five regions
brain<-brain[,1:5]
n.levels<-4
wave.var.list<-const.var.list(brain,n.levels=n.levels)
tot.regions <- dim(brain)[2]
n.series <- dim(brain)[1]
nb.num.regions <- 9
num.regions <- round(runif(nb.num.regions,2,tot.regions))
par(mfrow=c(3,3))
for(k in 1:(nb.num.regions)){
reg <- num.regions[k]
var.vector<-matrix(0,4,3)
for(i in 1:n.levels){
var.vector[i,1]<-(wave.var.list[[i]])[reg]
var.vector[i,2]<-(wave.var.list[[i+n.levels]])[reg]
var.vector[i,3]<-(wave.var.list[[i+2*n.levels]])[reg]
}
title <- num.regions[k]
matplot(2^(0:(n.levels-1)),var.vector,main=title,type="b",
log="x", pch="*LU", xaxt="n", lty=1, col=c(1,4,4),
xlab="Wavelet Scale",ylab="Wavelet Variance")
axis(side=1, at=2^(0:7))
abline(h=0)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.