enrollment: Simulating enrollment dates

Description Usage Arguments Value Examples

View source: R/enrollment.R

Description

This function simulates enrollment dates using either Poisson distribution

Usage

1
enrollment(param, N_total, time = NULL)

Arguments

param

vector. Lambda values for Poisson distribution.

N_total

integer. Value of total sample size.

time

vector. Knots (of length(param) - 1) indicating end of time when a specific lambda is used.

Value

A vector of enrollment times (from time of first patient enrollment) in days.

Examples

1
2
3
enrollment(param = c(0.003, 0.7), 100, time = 10)

enrollment(param = c(0.3, 0.5, 0.9, 1.2, 2.1), 200, c(20, 30, 40, 60))

thevaachandereng/BACT documentation built on July 24, 2020, 2:35 a.m.