predict.SL.glm.manning: Prediction method for 'SL.glm.manning'

Description Usage Arguments Value Examples

View source: R/SL.glm.manning.R

Description

Prediction method for SL.glm.manning

Usage

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

Arguments

object

An object of class SL.glm.manning

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 manning model
fit_glm.manning <- SL.glm.manning(Y = cost_data$totalcost, X = cost_data[, c("female", "race")],
                              newX = cost_data[, c("female", "race")])
# get back predictions
pred_glm.manning <- predict(fit_glm.manning$fit, newdata = cost_data[,c("female", "race")])

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