Description Usage Arguments Details Value Note Author(s) References See Also Examples
Computes the list of the correlation matrices in terms of the scale of the wavelet decomposition.
1 2 3 | const.cor.list(data.mat, names.data = 0, method = "modwt", wf = "la8",
n.levels = 4, boundary = "periodic", p.corr = 0.975,
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
|
p.corr |
(one minus the) two-sided p-value for the confidence interval |
save.wave |
logical. If TRUE all the wavelet coefficient are saved. |
export.data |
logical. If TRUE the correlation matrices 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 Correlation"
, basically, a list with the following
components
d? |
Correlation matrix for each scale of the wavelet decomposition. |
lowerd? |
matrix containing the lower bound of the correlation for each scale of the wavelet decomposition. |
upperd? |
matrix containing the upper bound of the correlation for each scale of the wavelet decomposition. |
change between version 1.1 and 1.2, now the length of the time series is saved with the values of the correlation.
S. Achard
R. Gencay, F. Selcuk and B. Whitcher (2001) An Introduction to Wavelets and Other Filtering Methods in Finance and Economics, Academic Press.
D. B. Percival 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.var.list
, read.cor.txt
, save.cor.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 37 38 39 40 41 42 43 44 | data(brain)
brain<-as.matrix(brain)
# WARNING : To process only the first five regions
brain<-brain[,1:5]
n.levels<-4
wave.cor.list<-const.cor.list(brain,n.levels=n.levels)
tot.regions <- dim(brain)[2]
n.series <- dim(brain)[1]
col.regions<-1
nb.comp.regions <- 8
comp.regions <- round(runif(nb.comp.regions,2,tot.regions))
sym.region <- col.regions+1
comp.regions <- c(sym.region,comp.regions)
name.ps <- "example-1.ps"
postscript(name.ps)
par(mfrow=c(3,3))
for(k in 1:(nb.comp.regions+1)){
reg <- comp.regions[k]
cor.vector<-matrix(0,4,3)
for(i in 1:n.levels){
cor.vector[i,1]<-(wave.cor.list[[i]])[1,reg]
cor.vector[i,2]<-(wave.cor.list[[i+n.levels]])[1,reg]
cor.vector[i,3]<-(wave.cor.list[[i+2*n.levels]])[1,reg]
}
title <- paste("1 -- ",comp.regions[k],sep="")
matplot(2^(0:(n.levels-1)),cor.vector,main=title,type="b",
log="x", pch="*LU", xaxt="n", lty=1, col=c(1,4,4),
xlab="Wavelet Scale",ylab="Wavelet Covariance",ylim=c(-0.5,1))
axis(side=1, at=2^(0:7))
abline(h=0)
}
dev.off()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.