Skip to content

F-statistics not working with mincRandomize #318

Description

@rwickens

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:

  1. mincRandomize(myLm_masked, R = 500, alternative = "greater",
    . columns = "F-statistic")
  2. mincRandomize.mincLm(myLm_masked, R = 500, alternative = "greater",
    . columns = "F-statistic")
  3. mincRandomize_core(lmod, R = R, replace = replace, parallel = parallel,
    . columns = columns, alternative = alternative, conf_file = conf_file,
    . resources = resources)
  4. boot_model(R)
  5. 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)
  6. f(init, x[[i]])
  7. apply(post_procd, 2, max)
  8. stop("dim(X) must have a positive length")

Using RMINC on a Mac (ARM64) using majestic-minc by josh unrau

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions