survdefHR: Create a Survdef Object Based on a Hazard Ratio

View source: R/survdefHR.R

survdefHRR Documentation

Create a Survdef Object Based on a Hazard Ratio

Description

Creates a new object which stores user-specified survival distribution information in the format needed for the main function, RMSTpow. survdefHR is used when the user wishes to specify a survival distribution that is defined by its relationship to another distribution via a constant hazard ratio.

Usage

survdefHR(survdefC, HR)

Arguments

survdefC

the survival distribution for the reference/control group, as a list in the form output by survdef.

HR

the hazard ratio defining the relationship between the two distributions.

Value

a list with components:

S

a vectorized function that takes time as input and returns the survival probability at that time

h

a vectorized function that takes time as input and returns the hazard at that time

Examples

con<-survdef(times = 3, surv = 0.5); survdefHR(con, 0.5)

anneae/RMSTdesign documentation built on Nov. 7, 2023, 1:59 a.m.