Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cor_bakers_gamma error #103

Open
caitsimop opened this issue Feb 1, 2021 · 1 comment
Open

cor_bakers_gamma error #103

caitsimop opened this issue Feb 1, 2021 · 1 comment
Labels

Comments

@caitsimop
Copy link

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

@caitsimop caitsimop added the bug label Feb 1, 2021
@talgalili
Copy link
Owner

talgalili commented Feb 16, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants