simulate_arm {npsurvSS}R Documentation

Simulate complete data for a single arm

Description

Simulate the complete data for a single arm, including time to accrual, event, and loss of follow-up. No cutoff (by number of events or time) is applied. Hence, no patients are administratively censored.

Usage

simulate_arm(arm, label = 1)

Arguments

arm

object of class 'arm'.

label

numeric label for the simulated arm, e.g. 0 for control, 1 for treatment

Value

arm

label

time.accr

time to accrual

time.obs

time to observation from accrual

time.total

time to observation from start of study

censor

0=censor, 1=event

reason

event description ('[experience ]event', '[loss to ]followup', 'administration[ censoring]')

time.surv

time to event

time.loss

time to loss of follow-up

See Also

create_arm for creating an object of class 'arm'.

Examples

arm0 <- create_arm(size=120, accr_time=6, surv_scale=0.05, loss_scale=0.005, follow_time=12)
simulate_arm(arm0, label=0)

[Package npsurvSS version 1.1.0 Index]