pwexpcuts: Piecewise exponential approximation to a survival...

View source: R/getDesignSurvivals.R

pwexpcutsR Documentation

Piecewise exponential approximation to a survival distribution

Description

Obtains the piecewise exponential distribution that approximates a survival distribution.

Usage

pwexpcuts(S, ...)

Arguments

S

The survival function of a univariate survival time.

...

Additional arguments to be passed to S.

Value

A list with three components:

  • piecewiseSurvivalTime: A vector that specifies the starting time of piecewise exponential survival time intervals. Must start with 0, e.g., c(0, 6) breaks the time axis into 2 event intervals: [0, 6) and [6, Inf).

  • lambda: A vector of hazard rates for the event. One for each analysis time interval.

  • loglik: The sequence of the asymptotic limit of the piecewise exponential log-likelihood for an increasing number of change points.

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)


lrstat documentation built on June 23, 2024, 5:06 p.m.