Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


Temporal (version 0.3.0.1)

ParaRMST: Restricted Mean Survival Time

Description

Calculates the RMST as the area under a fitted parametric survival distribution.

Usage

ParaRMST(fit, tau, sig = 0.05)

Value

Data.frame containing the estimated RMST at each truncation time.

Arguments

fit

Fitted parametric survival distribution.

tau

Numeric vector of truncation times.

sig

Significance level, for CIs.

Examples

Run this code
# Generate Weibull data with 20% censoring.
data <- GenData(n = 1e3, dist = "weibull", theta = c(2, 0.5), p = 0.2)

# Fit Weibull distribution.
fit <- FitParaSurv(data, dist = "weibull")

# Calculate RMSTs.
rmst <- ParaRMST(fit = fit, tau = c(0.5, 1.0, 1.5, 2.0))

# Generate gamma data with 10% censoring.
data <- GenData(n = 1e3, dist = "gamma", theta = c(2, 2), p = 0.10)

# Fit gamma distribution.
fit <- FitParaSurv(data, dist = "gamma")

# Calculate RMSTs.
rmst <- ParaRMST(fit = fit, tau = c(0.5, 1.0, 1.5, 2.0))

Run the code above in your browser using DataLab