SuperPredictor: Formula interface for SuperLearner::SuperLearner

Description Usage Arguments Details Examples

View source: R/SuperPredictor.R

Description

Formula interface for SuperLearner::SuperLearner

Usage

1
2
3
4
5
6
7
SuperPredictor(
  formula,
  data,
  family = "binomial",
  SL.library = c("SL.glm", "SL.glm.interaction", "SL.ranger"),
  ...
)

Arguments

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

Details

Formula interface for SuperLearner::SuperLearner ##' @param formula

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
if(requireNamespace("SuperLearner",quietly=TRUE)){
library(SuperLearner)
library(data.table)
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)

riskRegression documentation built on Jan. 13, 2021, 11:12 a.m.