FitGenGamma {Temporal} | R Documentation |
Generalized Gamma Distribution Parameter Estimation
Description
Estimates parameters for generalized gamma event times subject to non-informative
right censoring. The gamma distribution is parameterized in terms
of the shape parameters (\alpha,\beta)
, and the rate \lambda
:
f(t) = \frac{\beta\lambda}{\Gamma(\alpha)} (\lambda t)^{\alpha\beta-1}e^{-(\lambda t)^{\beta}}, t>0
Usage
FitGenGamma(
data,
beta_lower = 0.1,
beta_upper = 10,
eps = 1e-06,
init = list(),
maxit = 10,
report = FALSE,
sig = 0.05,
status_name = "status",
tau = NULL,
time_name = "time"
)
Arguments
data |
Data.frame. |
beta_lower |
If dist="gen-gamma", lower limit on possible values for beta. |
beta_upper |
If dist="gen-gamma", upper limit on possible values for beta. |
eps |
Tolerance for Newton-Raphson iterations. |
init |
List with initial values for the shape 'alpha', 'beta' and rate 'lambda' parameters. |
maxit |
Maximum number of NR iterations. |
report |
Report fitting progress? |
sig |
Significance level, for CIs. |
status_name |
Name of the status indicator, 1 if observed, 0 if censored. |
tau |
Optional truncation times for calculating RMSTs. |
time_name |
Name of column containing the time to event. |
Value
An object of class fit
containing the following:
- Parameters
The estimated shape
(\alpha,\beta)
and rate\lambda
parameters.- Information
The observed information matrix.
- Outcome
The fitted mean, median, and variance.
- RMST
The estimated RMSTs, if tau was specified.
Examples
set.seed(103)
# Generate generalized gamma data with 20% censoring.
data <- GenData(n = 1e4, dist = "gen-gamma", theta = c(2, 2, 2), p = 0.2)
# Estimate parameters.
fit <- FitParaSurv(data, dist = "gen-gamma", report = TRUE)