arrivalTimeDiscrete: arrivalTimeDiscrete

Description Usage Arguments Examples

Description

A function for generating event times from a stepwise rate function. For event times leave t0 at the default (0). For arrival times set t0 to the last arrival time.

Usage

1

Arguments

data

a dataframe containing a time and a rate column

t0

the time of the last arrival

Examples

1
2
3
4
data = data.frame(time = c(0,1,2,3,4,5),rate = c(0.5,2,3,4,6,7))
t0 = 0
arrivalTime(data, 0)
hist(sapply(1:10000, function(x) arrivalTime(data, 0)))

finite2/trialSim documentation built on May 16, 2019, 12:54 p.m.