# Example 1
example <- create_arm(size=120,
accr_time=6, # uniform accrual
surv_scale=0.05, # exponential survival
loss_scale=0.005, # exponential loss to follow-up
follow_time=12)
class(example) # this example also satisfies properties of subclass 'lachin'
# Example 2
create_arm(size=120,
accr_time=6, # truncated exponential accrual
accr_dist="truncexp",
accr_param=0.1,
surv_shape=2, # weibull survival
surv_scale=0.05,
loss_shape=1.5, # weilbull loss to follow-up
loss_scale=0.005,
total_time=18)
# Example 3
create_arm(size=120,
accr_time=6,
accr_interval=c(0,2,4,6), # piecewise uniform accrual
accr_param=c(0.2,0.3,0.5),
surv_cure=0.1, # 10% cure fraction
surv_interval=c(0,6,10,Inf), # piecewise exponential survival for uncured patients
surv_scale=c(0.05,0.04,0.03),
loss_shape=0.7, # weibull loss to follow-up
loss_scale=0.005,
total_time=18)
Run the code above in your browser using DataLab