SL.stratified: Stratified estimator

View source: R/sl_stratified.R

SL.stratifiedR Documentation

Stratified estimator

Description

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.

Usage

SL.stratified(Y, X, newX, family, obsWeights, id, stratify_on, ...)

Arguments

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.


ck37/ck37r documentation built on July 23, 2024, 10:31 p.m.