I have the following code:
 
## to check correlation between the simulated uniform data
x2 <- uni[,1] ; x2[1:10]
y2 <- uni[,2] ; y2[1:10]
result2 <- boot(cbind(x2,y2), f, 20)
# get 95% confidence interval 
boot.ci(result2, type="bca")
cor.test(x2,y2, method="pearson", conf.level=0.95)
 
part of my data:
 
> x2 <- uni[,1] ; x2[1:10]
 [1] 0.63933145 0.71677785 0.02181925 0.15913391 0.61021930 0.72878176 
0.22237891 0.28178186 0.75503612 0.54928692
> y2 <- uni[,2] ; y2[1:10]
 [1] 0.65754240 0.49263876 0.01352257 0.19195681 0.65759797 0.89813660 
0.24582441 0.12900017 0.78982501 0.68676534

## Result
> result2 <- boot(cbind(x2,y2), f, 20)
> result2
ORDINARY NONPARAMETRIC BOOTSTRAP

Call:
boot(data = cbind(x2, y2), statistic = f, R = 20)

Bootstrap Statistics :
    original       bias    std. error
t1* 0.891797 -0.005272889  0.01198383
 
Not sure about this:
 
> boot.ci(result2, type="bca")
Error in bca.ci(boot.out, conf, index[1], L = L, t = t.o, t0 = t0.o, h = h,  : 
  estimated adjustment 'a' is NA

> cor.test(x2,y2, method="pearson", conf.level=0.95)
        Pearson's product-moment correlation
data:  x2 and y2 
t = 51.7391, df = 689, p-value < 2.2e-16
alternative hypothesis: true correlation is not equal to 0 
95 percent confidence interval:
 0.8754420 0.9061121 
sample estimates:
     cor 
0.891797

My question is when I want to find the confidence interval why it gives me such 
message?
How do I get the p-value from the bootstrap?
 
Thank you so much


      
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to