# event: Scheduling interim analyses in clinical trials for... In interim: Scheduling Interim Analyses in Clinical Trials

## Description

Function `event` simulates the events base on a recruitment scenario simulated by function `recruitment`.

## Usage

 `1` ```event(r, er, dr, du) ```

## Arguments

 `r` recruitment scenario calculated with function `recruitment`. `er` event rate during the clinical trail. `dr` drop-out rate during the clinical trail. `du` duration of the clinical trail in weeks.

## Details

`event` simulates the events based on a given recruitment scenario. The function assumes an exponential distribution for the event probability with a common event rate for all subjects (`er`). The drop-out rate may be included. For the probability of an drop-out, `treatment` assumes an exponential distribution with a common rate `dr`. It is assumed that the even and drop-out time are independent of each other.

## Value

• `event` returns a list of vectors with the following components:

• `events` a vector with the (cumulative) number of frist events (events before drop-out)

• `drops` a vector with the (cumulative) number of patients who droped out of the trail before the first event

• `weeksOfEvent` a vector with the corresponding trial week when patients have experienced the first event (with start of site openings as reference start)

`recruitment` for simulating recruitment scenarios; `eventCourse` for plots of recruitment and event scenarios;
 ```1 2 3 4 5``` ```x=recruitment(nc=Inf,ns=Inf,cw=4,sw=2,sf=0.3,tb=4,en=400) y=event(r=x,er=0.12,dr=0.08,du=50) x=recruitment(nc=Inf,ns=Inf,cw=4,sw=2,sf=0.3,tb=4,en=400) y=event(r=x,er=0.12,dr=0.08,du=50) ```