exp_events: Expected number of events

View source: R/calc_events_and_duration.R

exp_eventsR Documentation

Expected number of events

Description

Given one or two treatment arms, calculate the expected number of events d at time \tau.

Usage

exp_events(arm0 = NA, arm1 = NA, tau = NA)

Arguments

arm0

object of class 'arm'.

arm1

object of class 'arm'.

tau

vector of times. Defaults to total study duration.

Value

expected number of events.

See Also

exp_duration for calculating time to achieve expected events d, create_arm and create_arm_lachin 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)
arm1 <- create_arm(size=120, accr_time=6, surv_scale=0.03, loss_scale=0.005, follow_time=12)
exp_events(arm0)
exp_events(arm0, arm1)
exp_events(arm0, tau=c(10,NA))
exp_events(arm0, arm1, tau=c(10,NA))

npsurvSS documentation built on May 29, 2024, 11:23 a.m.