make_coxph {shinyCox}R Documentation

Wrapper to create survival::coxph() object suitable for shine_coxph()

Description

Performs survival::coxph() with model = TRUE and x = TRUE as defaults. Checks that Cox model is appropriate for use with shine_coxph().

Usage

make_coxph(formula, data, ...)

Arguments

formula

a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a survival object as returned by the Surv function.

data

a data.frame in which to interpret the variables named in the formula, or in the subset and the weights argument.

...

other arguments which will be passed to coxph(). Note that x = TRUE and model = TRUE are the default arguments (and required by shine_coxph()), you do not need to include them here.

Value

Object of class "coxph" representing the fit

Examples

library(survival)
ovarianph <- make_coxph(Surv(futime, fustat) ~ age + strata(rx),
data = ovarian)

[Package shinyCox version 1.1.0 Index]