pwexpcuts {lrstat}R Documentation

Piecewise Exponential Approximation to a Survival Distribution

Description

Obtains the piecewise exponential distribution that approximates a survival distribution.

Usage

pwexpcuts(S, ..., tol = 1e-04)

Arguments

S

The survival function of a univariate survival time.

...

Additional arguments to be passed to S.

tol

The tolerance for convergence of the profile log-likelihood. Defaults to 0.0001.

Details

This function computes the piecewise exponential approximation to a survival distribution. The piecewise exponential model divides the time axis into J intervals defined by the change points, where each interval [t_j, t_{j+1}) has a constant hazard rate \lambda_j. The time intervals are specified as:

[t_1, t_2), [t_2, t_3), \ldots, [t_{J}, t_{J+1})

where t_1 = 0, t_{J+1} = \infty, and t_j = \tau_{j-1} for j = 2, \ldots, J. The function starts with J = 2 (1 change point) and gradually increases J by adding one change point at a time until the maximized profile log-likelihood for change points stabilizes, i.e., the relative increase in the maximum of the profile log-likelihood function is less than tol. If the relative change in the hazard rate is also less than tol, the function stops and returns the results.

Value

A list with three components:

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


# Example 1: Piecewise exponential
pwexpcuts(ptpwexp, piecewiseSurvivalTime = c(0, 3.4, 5.5),
          lambda = c(0.0168, 0.0833, 0.0431), lowerBound = 0,
          lower.tail = FALSE)

# Example 2: Weibull
pwexpcuts(pweibull, shape = 1.37, scale = 1/0.818, lower.tail = FALSE)


[Package lrstat version 0.2.15 Index]