Hello,
I'm trying to use mincRandomize on my mincLm object, which contains a column called F-statistic. In the documentation, I see that the default is t-stats...However, I'm attempting the following:
result = mincRandomize(myLm_masked, R = 500, alternative = "greater", columns = "F-statistic")
Am I calling it correctly? It's giving me the following error:
Error in apply(post_procd, 2, max): dim(X) must have a positive length
Traceback:
- mincRandomize(myLm_masked, R = 500, alternative = "greater",
. columns = "F-statistic")
- mincRandomize.mincLm(myLm_masked, R = 500, alternative = "greater",
. columns = "F-statistic")
- mincRandomize_core(lmod, R = R, replace = replace, parallel = parallel,
. columns = columns, alternative = alternative, conf_file = conf_file,
. resources = resources)
- boot_model(R)
- Reduce(function(max_val_matrix, i) {
. shuf_data <- lmod_data
. shuf_data[, pred_cols] <- lmod_data[sample(seq_len(nrow(lmod_data)),
. replace = replace), pred_cols]
. new_mod <- update(lmod, data = shuf_data)
. new_mod[!is.finite(new_mod)] <- 0
. post_procd <- post_proc(new_mod[, columns], ...)
. if (alternative == "two.sided") {
. post_procd <- abs(post_procd)
. }
. biggest_stats <- apply(post_procd, 2, max)
. rbind(max_val_matrix, biggest_stats) %>% colnames<-(colnames(lmod)[columns]) %>%
. rownames<-(NULL)
. }, seq_len(n), NULL)
- f(init, x[[i]])
- apply(post_procd, 2, max)
- stop("dim(X) must have a positive length")
Using RMINC on a Mac (ARM64) using majestic-minc by josh unrau
Hello,
I'm trying to use mincRandomize on my mincLm object, which contains a column called F-statistic. In the documentation, I see that the default is t-stats...However, I'm attempting the following:
result = mincRandomize(myLm_masked, R = 500, alternative = "greater", columns = "F-statistic")
Am I calling it correctly? It's giving me the following error:
Error in apply(post_procd, 2, max): dim(X) must have a positive length
Traceback:
. columns = "F-statistic")
. columns = "F-statistic")
. columns = columns, alternative = alternative, conf_file = conf_file,
. resources = resources)
. shuf_data <- lmod_data
. shuf_data[, pred_cols] <- lmod_data[sample(seq_len(nrow(lmod_data)),
. replace = replace), pred_cols]
. new_mod <- update(lmod, data = shuf_data)
. new_mod[!is.finite(new_mod)] <- 0
. post_procd <- post_proc(new_mod[, columns], ...)
. if (alternative == "two.sided") {
. post_procd <- abs(post_procd)
. }
. biggest_stats <- apply(post_procd, 2, max)
. rbind(max_val_matrix, biggest_stats) %>%
colnames<-(colnames(lmod)[columns]) %>%.
rownames<-(NULL). }, seq_len(n), NULL)
Using RMINC on a Mac (ARM64) using majestic-minc by josh unrau