Movatterモバイル変換


[0]ホーム

URL:


Type:Package
Title:Competing Risk in Dependent Net Survival Analysis
Version:1.0.0
Date:2025-01-09
Description:Provides statistical tools for analyzing net and relative survival, with a key feature of relaxing the assumption of independent censoring and incorporating the effect of dependent competing risks. It employs a copula-based methodology, specifically the Archimedean copula, to simulate data, conduct survival analysis, and offer comparisons with other methods. This approach is detailed in the work of Adatorwovor et al. (2022) <doi:10.1515/ijb-2021-0016>.
Encoding:UTF-8
Imports:methods, Rcpp, Rmpfr, copula, gplots, ggplot2, viridis, sqldf,data.table, relsurv
LinkingTo:Rcpp, RcppArmadillo
Suggests:knitr, rmarkdown, markdown
VignetteBuilder:knitr
License:GPL (≥ 3)
RoxygenNote:7.2.3
NeedsCompilation:yes
Packaged:2025-01-19 06:03:35 UTC; Admin
Author:Reuben Adatorwovor [aut], Paul Little [cre]
Maintainer:Paul Little <pllittle321@gmail.com>
Repository:CRAN
Date/Publication:2025-01-21 15:40:05 UTC

opt_sum

Description

Summarizes the solutions post-optimization

Usage

opt_sum(OPT)

Arguments

OPT

Output list fromrun_analyses()

Value

A dataframe containing a summary of each successfully optimized configuration of copula and density with correspondingconstrained maximum likelihood estimates, and Bayesian Information Criteria.


plot_SURVs

Description

Plot net survival probabilities per model

Usage

plot_SURVs(run_ANA, MULTIPLE, ncol = 1, ALPHA = 0.5)

Arguments

run_ANA

The object outputted fromrun_analysesfunction.

MULTIPLE

A boolean set toTRUE to displaya survival plot pertheta with accompanying maximum log likelihood. Otherwise, the survival plots will be overlayed with a legend.

ncol

Integer number of columns of plots to display

ALPHA

A numeric value between 0 and 1 to control theconfidence band transparency.

Value

Returns a ggplot object of survival predictions and corresponding confidence intervals, Bayesian Information Criteria,maximum likelihood estimates. The user may apply their owncustomized graphic edits prior to visualizing the final graphicwith theprint() function.


refData_match

Description

This function takes as inputa working dataset of interest and a reference dataset.

Usage

refData_match(wDAT, rDAT, ncores = 1)

Arguments

wDAT

A working dataset data.frame containing required columnsage,time,datediag_yr, andsex corresponding to age, observed time (in years), diagnosis year, and sex (coded 'female'/'male'), respectively.

rDAT

A reference dataset data.frame containingrequired columnsyear,age,qx,andsex corresponding to reference year, reference age, event's interval hazard, and sex, respectively.

ncores

Integer number of parallel threads to decreasematching runtime.

Value

A dataframe containing calculated log-transformed density and log-transformed cumulative distribution


run_analyses

Description

This function performs a full analysis of an inputted dataframe. The user may specify one of two copulas, atheta value, a parametric grid to search over, and a vector of times for predicting survival.

Usage

run_analyses(  DATA,  THETAs = NULL,  upKAPPA,  gTHRES = 0.1,  COPULAS,  param_grid,  vec_time,  ncores = 1,  max_iter = 200,  verb,  PLOT)

Arguments

DATA

A data.frame containing column namestime (in years),delta (event indicator),log_dens_t2 (log-transformed population-based density), andlog_cdf_t2 (log-transformed population-based cumulative density).

THETAs

A vector of theta values to explore and optimize over.

upKAPPA

An integer value taking values 0 or 1. If set to 1, the exponentiated Weibull distribution is assumed. Otherwise,the Weibull distribution is assumed and optimized over. Ifundefined, the optimization will search over both distributions.

gTHRES

A numeric threshold on the L2 norm of the gradient evaluated at the MLE.

COPULAS

If undefined, will optimize over all copulas. Otherwise set to 'Independent', 'Clayton' or 'Gumbel'

param_grid

Vector of values spanning possible log(alpha1), log(lambda1), log(kappa1), unconstrained theta parameters

vec_time

Vector of times in years to calculate predicted survival.

ncores

A positive integer for the number of threads to evaluate log-likelihoods across the parameter grid.

max_iter

Maximum Newton Raphson and Gradient Descent iterationsto set.

verb

Boolean value to display verbose information or not

PLOT

A logical variable, set toTRUE by default toshow the two-dimensional heatmap of the profile likelihood ifverb = TRUE.

Value

Returns a parsable list of results per successfully optimized configuration of copula and density with accompanying net survival predictions, survival confidence intervals, maximum likelihood estimates, MLE confidence intervals (constrained and unconstrained), Bayesian Information Criteria for model selection, and extra statistical metrics to confirm convergence.


[8]ページ先頭

©2009-2025 Movatter.jp