Skip to content

Commit

Permalink
ENH: skip missing data pattern check when minpuc == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
vkhodygo committed Oct 4, 2023
1 parent da91bfc commit 81b5cea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/quickpred.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ quickpred <- function(data, mincor = 0.1, minpuc = 0, include = "",
predictorMatrix[maxc > mincor] <- 1

# exclude predictors with a percentage usable cases below minpuc
p <- md.pairs(data)
puc <- p$mr / (p$mr + p$mm)
predictorMatrix[puc < minpuc] <- 0
if (minpuc != 0) {
p <- md.pairs(data)
puc <- p$mr / (p$mr + p$mm)
predictorMatrix[puc < minpuc] <- 0
}

# exclude predictors listed in the exclude argument
yz <- pmatch(exclude, names(data))
Expand Down

0 comments on commit 81b5cea

Please sign in to comment.