R 使用BCa方法计算自举置信区间时出错(';w';为无穷大)
我正在尝试使用BCa方法计算Kendall的W估计值的引导CI,但收到以下错误消息: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次复制,但没有成功。有人问了一个类似的问题,但不幸的是没有给出答
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)