[R] Block length for Bivariate Stationary Bootstrap for Inference for Correlation
Andreas Klein
klein82517 at yahoo.de
Fri Nov 18 19:31:27 CET 2011
Hello,
I am searching for a method, algorithm or some solution to the following problem:
I need an estimator for the block length of two series to bootstrap the correlation coefficient with the stationary bootstrap procedure. The problem here: the two series have different block lengths!
Here is an example:
x and y are positively correlated and I would like to construct
percentile bootstrap confidence intervals for the correlation
coefficient between x and y.
######The question marks highlight the problem#####
x <- c(2.62,2.56,0.36,-3.43,2.44,2.77,-0.11,4.32,0.32,0.41,5.39,-2.30,7.27,2.42,4.69,-4.44,6.66,2.15,-0.60,-1.77)
y <- c(10.40,13.56,2.11,-3.96,8.45,0.49,-2.48,14.09,3.45,7.15,-2.08,3.09,13.06,3.37,8.41,-6.63,6.01,7.94,-0.54,5.10)
xy <- cbind(x,y)
library(np)
lx <- b.star(x,round=TRUE)[1,1]
ly <- b.star(y,round=TRUE)[1,1]
lxy <- ???
library(tseries)
result <- tsbootstrap(x=1:nrow(xy),nb=1000,statistic=function(idx,data) cor(data[idx,1],data[idx,2]),m=1,b=lxy,type="stationary",data=xy)
######
lx is not equal to ly, so what is lxy or what can it be or how can I estimate it? Is there something similar like b.star() but for bivariate problems?
I can estimate the block length for x (lx) or for y (ly) with b.star() but not the joint block length (lxy) to consider on the one hand the autocorrelation of x and y and on the other hand preserve the correlation structure between the two series.
Does anyone know a solution regarding the stationary bootstrap (no VAR-sieve bootstrap approach)? An exisitng algorithm like b.star() which considers the cross-correlation between the two variables?
I hope you can help me. Thanks a lot...
Regards,
Andy.
More information about the R-help
mailing list