digitise: Format digitised data for use in survival analysis

View source: R/digitise.R

digitiseR Documentation

Format digitised data for use in survival analysis

Description

Produces txt files with Kaplan Meier and individual level survival data from digitised Kaplan Meier curves obtained by DigitizeIT

Usage

digitise(
  surv_inp,
  nrisk_inp,
  km_output = "KMdata.txt",
  ipd_output = "IPDdata.txt"
)

Arguments

surv_inp

a txt file obtained for example by DigitizeIT and containing the input survival times from graph reading. This file contains 3 columns 'ID' = the row-ID 'time' = the vector of times captured by the digitisation process 'survival' = the vector of survival probabilities captured by the digitisation process

nrisk_inp

a txt file obtained by DigitizeIT and containing the reported number at risk. This contains the following columns: 'Interval' = the ID of the various intervals included in the analysis ( eg 1, 2, 3, ...) 'Time' = the actual time shown on the x-axis in the digitsed graph 'Lower' = the row of the extracted co-ordinates that the time corresponds to 'Upper' = the row of the extracted co-ordinates for which the time is less than the following time at which we have a number at risk 'nrisk' = the actual number at risk as specified in the original data

km_output

the name of the file to which the KM data will be written

ipd_output

the name of the file to which the individual level data data will be written

Author(s)

Patricia Guyot and Gianluca Baio

References

G Baio (2019). survHE: Survival analysis for health economic evaluation and cost-effectiveness modelling. Journal of Statistical Software (2020). vol 95, 14, 1-47. doi:10.18637/jss.v095.i14

Examples

## Not run: 
# Defines the txt files to be used as inputs
surv.inp <- system.file("extdata", "survival.txt", package = "survHE")
nrisk.inp <- system.file("extdata", "nrisk.txt", package = "survHE")
# Runs 'digitise' to create the relevant output files
digitise(surv.inp, nrisk.inp)

## End(Not run)

survHE documentation built on March 31, 2023, 11:37 p.m.