Giter Club home page Giter Club logo

mppre_funcm's Introduction

MPPRE_FunCM

Code for (i) modelling of Marked-Point Process compensators related to Recurrent Events (MPPRE) of interest with cross-validation; (ii) fitting a Functional linear Cox Model (FunCM) with the obtained compensators as multivariate functional covariates (model selection by cross-validation). [This code is also freely available as Supporting Information in the main reference paper.]

Reference

Spreafico, M. & Ieva, F. (2021). Functional modeling of recurrent events on time-to-event processes. Biometrical Journal, 63(5):948-967. https://onlinelibrary.wiley.com/doi/10.1002/bimj.202000374

Data Availability

We cannot provide the original administrative data due to confidentiality. We provide some fake datasets in order to allow researchers who want to replicate the same analysis to properly get how the code has to be run and how results are displayed and should be read.

Description

  • Files:

    • 1_clinical_history.R: Code for Table 3 (Appendix A.2 - Results of "Step 1: Data preprocessing and clinical history")
    • 2_modelling_compensators.R: Code for "Step 2: Modelling compensators of marked point processes" (Table 1 included). It generates results 'best_AGmodels.Rdata', 'baseline_haz.R' and 'compensators.R' that will be saved in folder '/results'.
    • 3_fpca_compensators: Code for "Step 3: Summarize compensators through Functional Principal Component Analysis". It generates results 'fpca_compensators.R' that will be saved in folder /results.
    • 4_functional_Cox.R: Code for "Step 4: Predictive functional Cox model for overall survival".
    • figures.R: Code for Figures 3-4-5-6-7-8.
  • Sub-folder ./utils_functions/ contains some auxiliary functions to run the code.

  • Sub-folder ./data/ contains fake datasets along with their legends:

    • fake_recurrent.Rdata: It contains four datasets (once for each process h = {ACE, BB, AA, HF hosp}), namely 'ACE_df', 'BB_df', 'AA_df' and 'HF_df', related to the clinical history of the events of interest for 500 fake patients. Datasets have been reformatted as explained in Appendix A.2.
      • recurrent_legend.txt: Variables legend of dataset 'fake_recurrent.Rdata'.
      • fake_survival.Rdata: Survival data 'survival_df' related to the 500 fake patients.
      • survival_legend.txt: Variables legend of datasets 'fake_survival.Rdata'
  • Sub-folder ./results is an empty folder where intermediate results will be saved.

Software

  • R software.
  • File sessionInfo.txt contains a list of code configurations [software version (incl. package versions), platform].

(Last update: July 20th, 2023)

mppre_funcm's People

Contributors

mspreafico avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.