SL.coxph: Cox proportional hazard regression models back-transformed to...

Description Usage Arguments Value References Examples

View source: R/SL.coxph.R

Description

This function implements Cox proportional hazard regression models (David 1972), and back-transforms to the conditional mean scale (see also Basu 2005).

Usage

1
SL.coxph(Y, X, newX, family, obsWeights, ...)

Arguments

Y

A numeric outcome variable

X

A data.frame of covariates constituting the training sample

newX

A data.frame with the same column names and format as X constituting the validation sample.

family

Gaussian only

obsWeights

Observation-level weights (not currently used)

...

Other arguments (unused)

Value

pred

Predicted outcomes based on predictors in newX

fit

A list with named entries object (the fitted coxph model object), randomUpper.

References

Basu A and Rathouz PJ. Estimating marginal and incremental effects on health outcomes using flexible link and variance function models. Biostatistics 2005; 6(1): 93–109.

Examples

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

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