SurvExt: SurvExt - Extended Survival Object

Description Usage Arguments Examples

Description

Creates an SurvExt object that combines survival and exposure information. Can be used for RPSFT analysis.

Usage

1
SurvExt(formula, data, Exposure, AdminCensTime, FirstSwitchTime)

Arguments

formula

A formula for survival time on randomized treatment. Can only include single regression variable.

data

Required. A data frame in which to interpret the variables named in the formula and other arguments.

Exposure

Defines the exposure to study drug per patient.

AdminCensTime

Defines the administrative censoring time.

FirstSwitchTime

Defines the first time of switch

Examples

1
2
3
4
5
6
7
sim.df <- simStudy()
x <- SurvExt(Surv(os.t, os.e) ~ I(x.trt==1),
   Exposure = ifelse(x.trt == 1, os.t, ifelse(x.switch == 1, os.t - t.switch, 0)),
   AdminCensTime = t.censor,
   data = sim.df)
plot(x)
RPSFT(x)

iain-t-bennett/SwitchPack documentation built on May 16, 2019, 11:07 a.m.