cor_bakers_gamma error
caitsimop opened this issue · 1 comments
I'm following your tutorial and am running into an error when I try to reproduce the 95% confidence interval of cor_bakers_gamma()
results.
Specifically, I'm using this code chunk with my two own small dendrograms:
dend1 <- dend15
dend2 <- dend51
set.seed(23801)
R <- 100
dend1_labels <- labels(dend1)
dend2_labels <- labels(dend2)
cor_bakers_gamma_results <- numeric(R)
for(i in 1:R) {
sampled_labels <- sample(dend1_labels, replace = TRUE)
dend_mixed1 <- sample.dendrogram(dend1,
dend_labels=dend1_labels,
fix_members=TRUE,fix_order=TRUE,fix_midpoint=FALSE,
replace = TRUE, sampled_labels=sampled_labels
)
dend_mixed2 <- sample.dendrogram(dend2, dend_labels=dend2_labels,
fix_members=TRUE,fix_order=TRUE,fix_midpoint=FALSE,
replace = TRUE, sampled_labels=sampled_labels
)
cor_bakers_gamma_results[i] <- cor_bakers_gamma(dend_mixed1, dend_mixed2, warn = FALSE)
}
I am getting the following warning: It is impossible to produce a one-to-one cut for the k/h you specidied. 0's have been introduced. Note that this result would be different from R's default cutree output.It is impossible to produce a one-to-one cut for the k/h you specidied. 0's have been introduced. Note that this result would be different from R's default cutree output
I was hoping I could get some help with this warning and some information to solve it. Calculating cor_bakers_gamma()
works with the original dendrograms and I'm also able to calculate a bootstrap p-value. However, I'm interested in calculating the 95% CI.
Thanks!
Caitlin