SetSubjectSwitchTimes.Switches: Set the patient times at which the hazard functions changes

Description Usage Arguments Value Examples

View source: R/rateSwitchTimes.R

Description

For a given study-time period there is a set of subject times at which the hazard functions changes. This function allows these time to be entered into a Switches object. If there is already a set of patient times for calendarTime then they will be overwritten

Usage

1
2
SetSubjectSwitchTimes.Switches(object, calendarTime,
  times = vector("numeric"))

Arguments

object

The switches object to which the new times are added

calendarTime

The calendar time at which these new patient times are used. calendarTime should be in object$calendarTimes (which includes calendar time 0 – the start of the trial).

times

a vector of positive patient times at which the hazard function changes, the default option times = vector("numeric") is used when the same hazard functions are used for all patient-time for this calendar time

Value

switches object with the new patient times added.

Examples

1
2
3
4
5
6
 switches <- InitializeStudySwitches(c(5,10,20))
 print(switches)
 switches <- SetSubjectSwitchTimes.Switches(switches,0,c(5,50))
 print(switches)
 switches <- SetSubjectSwitchTimes.Switches(switches,10,c(5,50))
 print(switches)

scientific-computing-solutions/badminton documentation built on May 29, 2019, 3:43 p.m.