| residuals_frailty | R Documentation |
Computes Cox-Snell, Martingale, Deviance, raw, standardized, and studentized residuals along with Kolmogorov-Smirnov (K-S) goodness-of-fit statistics against standard Exponential(1).
residuals_frailty(fit)
fit |
A fitted object of class |
A list containing residual vectors, summary accuracy metrics (MSE, RMSE, MAE, R_square, Adj_R_square),
and K-S test results (KS_stat, KS_pvalue).
Cox, D. R., & Snell, E. J. (1968). A general definition of residuals. Journal of the Royal Statistical Society: Series B (Methodological), 30(2), 248-265.
Pandey, A., Hanagal, D. D., & Tyagi, S. (2022). Shared Frailty Models Based on Cancer Data. International Journal of Statistics and Reliability Engineering, 9(3), 461-474.
Pandey, A., & Tyagi, S. (2021). Comparison of Multiplicative Frailty Models Under Weibull Baseline Distribution. Lobachevskii Journal of Mathematics, 42(13), 3184-3195.
set.seed(123)
dat <- r_frailty(n = 60, baseline = "weibull", bpar = c(2, 1.5), frailty = "gamma", fpar = c(0.8))
fit <- fit_frailty(time = dat$time, status = dat$status, baseline = "weibull", frailty = "gamma")
res <- residuals_frailty(fit)
print(res$KS_pvalue)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.