predict.SL.wang: Prediction method for 'SL.wang'

Description Usage Arguments Value Examples

View source: R/SL.wang.R

Description

Prediction method for SL.wang

Usage

1
2
## S3 method for class 'SL.wang'
predict(object, newdata, ...)

Arguments

object

An object of class SL.wang

newdata

A data.frame to generate predictions for

...

Other arguments (unused)

Value

A numeric vector of predictions

Examples

1
2
3
4
5
6
7
# load cost data
data(cost_data)
# fit wang model
fit_wang <- SL.wang(Y = cost_data$totalcost, X = cost_data[, c("female", "race")],
                              newX = cost_data[, c("female", "race")])
# get back predictions
pred_wang <- predict(fit_wang$fit, newdata = cost_data[,c("female", "race")])

wuziyueemory/twostageSL documentation built on Oct. 19, 2020, 3:45 p.m.