View source: R/sl_stratified.R
SL.stratified | R Documentation |
This estimator stratifies the dataset on the values of the specified variables and predicts the outcome mean within each cell. It is intended as a low-variance, high bias estimator that can often provide better predictions than the overall outcome mean.
SL.stratified(Y, X, newX, family, obsWeights, id, stratify_on, ...)
Y |
Outcome variable |
X |
Covariate dataframe |
newX |
Dataframe to predict the outcome |
family |
"gaussian" for regression, "binomial" for binary classification. Untested options: "multinomial" for multiple classification or "mgaussian" for multiple response, "poisson" for non-negative outcome with proportional mean and variance, "cox". |
obsWeights |
Optional observation-level weights |
id |
Optional id to group observations from the same unit (not used currently). |
stratify_on |
Vector of variables used to create stratification cells, e.g. c('age', 'gender'). |
... |
Any other arguments, not used. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.