PieceExponential: Piecewise Exponential Curve constructor function

Description Usage Arguments Details Author(s) Examples

View source: R/curve_constructors.R

Description

This creates a Curve object for a Piecewise Exponential distribution.
Curve objects contain all necessary information to describe a distribution, including functions and parameters describing it.
Parameterisation follows that used by pexp etc. This function requires a vector of start times (beginning with 0) and a corresponding vector of rates. See Details for more information on parameterisation.

Usage

1

Arguments

start

Vector of start times for each period. First element must be 0. Must be same length as lambda vector.

lambda

Vector of rate parameters from the corresponding respective time defined in start vector until the start of the next period. Must be same length as start vector.

Details

The piecewise exponential distribution with rates lambda_1 to lambda_n and start times t_1 to t_n has parameterisation:
Product(x=1:length(lambda)) of (e^(-lambda[x].t[x])) where t[x] = min(start[x+1],max(0,t-start[x])). start[x+1] is defined as Inf if otherwise undefined.

Author(s)

James Bell

Examples

1
PieceExponential(start=c(0,6,24),lambda=c(0.05,0.01,0.001))

gestate documentation built on Feb. 20, 2020, 5:08 p.m.