Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (12 sloc) 491 Bytes
screen.ttest <- function(Y, X, family, obsWeights, id, rank = 2, ...) {
# implemented with colttests from the genefilter package
.SL.require('genefilter')
if (family$family == "gaussian") {
stop('t-test screening undefined for gaussian family, look at screen.corP or screen.corRank')
}
if (family$family == "binomial") {
listP <- colttests(x = as.matrix(X), fac = as.factor(Y), tstatOnly = FALSE)$p.value
}
whichVariable <- (rank(listP) <= rank)
return(whichVariable)
}
Jump to Line
Something went wrong with that request. Please try again.