ParaRMST | R Documentation |
Calculates the RMST as the area under a fitted parametric survival distribution.
ParaRMST(fit, tau, sig = 0.05)
fit |
Fitted parametric survival distribution. |
tau |
Numeric vector of truncation times. |
sig |
Significance level, for CIs. |
Data.frame containing the estimated RMST at each truncation time.
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.