Movatterモバイル変換


[0]ホーム

URL:


PERSUADE

ParamEtRic SUrvivAl moDel sElection

A standardized R tool to support the selection, comparison, andcommunication of parametric survival models, and their implementation indecision-analytic models.


Overview

PERSUADE guides analysts through a reproducible workflow for survivalanalysis and model selection. It provides:

The framework is designed for transparency and consistency whensurvival analysis feeds into decision-analytic models.


Prerequisites

Quick start

The easiest way to get started is by running the example workflowscript:PERSUADE_example_workflow.R using:file.edit(system.file("example_workflow", "PERSUADE_example_workflow.R", package = "PERSUADE"))

This script:


Step-by-step workflow

1. Load PERSUADE package

library(PERSUADE)

2. Run example analysis

PERSUADE<-f_PERSUADE(name ="BC_OS",years = flexsurv::bc$recyrs,# time-to-eventstatus = flexsurv::bc$censrec,# event indicatorgroup = flexsurv::bc$group,# grouping variablestrata =TRUE,spline_mod =TRUE,cure_mod =TRUE,time_unit =1/12,# months in yearstime_horizon =40,time_pred_surv_table =c(0,1,2,5,10,20,30,40))

3. Inspect the object

print(PERSUADE)

4. Summarize results

# Kaplan-Meier estimatessummary(PERSUADE,type ="km")# Survival probabilities at time pointssummary(PERSUADE,type ="surv_probs")# Goodness-of-fit for standard parametric modelssummary(PERSUADE,type ="gof")# Goodness-of-fit for spline-based modelssummary(PERSUADE,type ="gof_spline")# Goodness-of-fit for cure modelssummary(PERSUADE,type ="gof_cure")

5. Visualize results

# Set colour palette for Figurespalette(rainbow(n =9,s =1,v =1,start =0,end =max(1,9-1)/9,alpha =1))# Kaplan-Meier curvesplot(PERSUADE,type ="km")# Proportional hazards diagnosticsplot(PERSUADE,type ="ph")# Observed smoothed hazardplot(PERSUADE,type ="hr")# Standard parametric modelsplot(PERSUADE,type ="param_models")# Spline-based modelsplot(PERSUADE,type ="spline_models")# Cure modelsplot(PERSUADE,type ="cure_models")# Set colour palette to defaultpalette("default")

6. Generate the report

f_generate_report(PERSUADE)

7. Export model parameters

# Copy to clipboard (for copying in PERSUADE Excel template.xltx)write.table(PERSUADE$surv_model_excel,"clipboard-128",sep ="\t",col.names =FALSE)# Export to CSV (change `tempdir()` into `getwd()` for copying to working directory)write.csv(PERSUADE$surv_model_excel,file.path(tempdir(),paste0(name,"_output"),"PERSUADE_Time-to-event_models_parameters_comma.csv"))write.csv2(PERSUADE$surv_model_excel,file.path(tempdir(),paste0(name,"_output"),"PERSUADE_Time-to-event_models_parameters_semicolon.csv"))
8.Obtain Excel template to incorporate model parameters indecision-analytic model
f_get_excel_template()

Workflow diagram

Visualize the process via the included diagram:
PERSUADE Workflow Overview

(Alternatively, open the.vsdx version ifpreferred.)


Tips for running your ownanalyses

Start by running the example script to familiarize yourself with theworkflow. For your own data:


Extending or customizing


Acknowledgments & history


License & contact

Licensed underGPL3.
For questions, enhancements, or collaboration, reach out via GitHubdiscussions or issues.


[8]ページ先頭

©2009-2025 Movatter.jp