boot performs 95% confidential interval and outputs NaNs for original and bias for a column of data but normal for another two columns

Viewed 17

can anyone help with this problem that I could not figure out? to perform 95% CI using boot but it outputs NaNs for original and bias for one column, e.g.fst_A_B_C_D$Fst_C_D, of the data. It works well with another two columns in the dataset. Below are the codes that I used. Many thanks in advance.

> mean_fst <- function(x,d){
  return(mean(x[d]))
}

> str(fst_A_B_C_D$Fst_C_D)
 num [1:8554] 0.836 0.759 0.793 0.663 0.644 ...

> bt5000_Fst_C_D=boot(fst_A_B_C_D$Fst_C_D,mean_fst,R=5000)

> bt5000_Fst_C_D

ORDINARY NONPARAMETRIC BOOTSTRAP
Call:
boot(data = fst_A_B_C_D$Fst_C_D, statistic = mean_fst, 
    R = 5000)
Bootstrap Statistics :
    original  bias    std. error
t1*      NaN     NaN 0.002661512

> plot(bt5000_Fst_C_D)
Error in if (t0 < rg[1L]) rg[1L] <- t0 else if (t0 > rg[2L]) rg[2L] <- t0 : 
  missing value where TRUE/FALSE needed
0 Answers
Related