View source: R/SuperPredictor.R
SuperPredictor | R Documentation |
Formula interface for SuperLearner::SuperLearner
SuperPredictor(
formula,
data,
family = "binomial",
SL.library = c("SL.glm", "SL.glm.interaction", "SL.ranger"),
...
)
formula |
where the left hand side specifies the outcome and the right hand side the predictors |
data |
data set in which formula can be evaluated |
family |
the outcome family. default is binomial |
SL.library |
the SuperLearner libraries |
... |
passed to SuperLearner::SuperLearner |
Formula interface for SuperLearner::SuperLearner ##' @param formula
## Not run:
if(require("SuperLearner",quietly=TRUE)){
library(SuperLearner)
library(data.table)
set.seed(10)
d = sampleData(338, outcome="binary")
spfit = SuperPredictor(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10,data=d)
predictRisk(spfit)
x <- Score(list(spfit),data=d,formula=Y~1)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.