Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 使用BCa方法计算自举置信区间时出错(';w';为无穷大)_R_Confidence Interval_Statistics Bootstrap - Fatal编程技术网

R 使用BCa方法计算自举置信区间时出错(';w';为无穷大)

R 使用BCa方法计算自举置信区间时出错(';w';为无穷大),r,confidence-interval,statistics-bootstrap,R,Confidence Interval,Statistics Bootstrap,我正在尝试使用BCa方法计算Kendall的W估计值的引导CI,但收到以下错误消息: Error in bca.ci(boot.out, conf, index[1L], L = L, t = t.o, t0 = t0.o, : estimated adjustment 'w' is infinite 我的实际数据集是4908行。所有其他方法(norm、perc等)都在这个数据集上工作,我没有丢失值。我还尝试了10000次复制,但没有成功。有人问了一个类似的问题,但不幸的是没有给出答

我正在尝试使用BCa方法计算Kendall的W估计值的引导CI,但收到以下错误消息:

Error in bca.ci(boot.out, conf, index[1L], L = L, t = t.o, t0 = t0.o,  : 
  estimated adjustment 'w' is infinite

我的实际数据集是4908行。所有其他方法(norm、perc等)都在这个数据集上工作,我没有丢失值。我还尝试了10000次复制,但没有成功。有人问了一个类似的问题,但不幸的是没有给出答案。我想知道是否有人知道出了什么问题

这是一个带有我的代码的测试数据集:

library(rcompanion)

testdata = structure(list(var1 = structure(c(3, 1, 1, 1, 3, 0, 3, 
                                             0, 1, 0, 0, 1, 0, 0, 
                                             0, 0, 0, 1, 1, 0), label = "Variable 1", class = c("labelled", "numeric")), 
                          var2 = structure(c(1, 0, 0, 0, 3, 0, 3, 
                                             1, 1, 0, 1, 0, 0, 0, 
                                             1, 1, 0, 0, 1, 0), label = "Variable 2", class = c("labelled","numeric"))), 
                   row.names = c(NA, -20L), class = c("tbl_df", "tbl", "data.frame"))

testci = rcompanion::kendallW(testdata, correct = TRUE, ci=TRUE, conf=0.95, type="bca", R=1000)