add_clicks function

Add clicks to subdistribution curves for reconstructing CIC

Add clicks to subdistribution curves for reconstructing CIC

When there are more clicks in the composite (overall) outcome curve, we need to add them to the subdistribution curves. Find the time points in the composite data that are furthest away from the times in clicksDF, add these times to clicksDF with 0 jumps in cuminc.

add_clicks(clicksDF, targetTimes, nAdd)

Arguments

  • clicksDF: A data frame with the two columns, time and cuminc.
  • targetTimes: A vector of times from the composite KM plot.
  • nAdd: Number of times to add to clicksDF.

Returns

An augmented clicksDF with extra rows (no cuminc jumps in those extra times).

Examples

clicksDF <- data.frame(time=0:10, cuminc=seq(from=0, to=1, by=0.1)) add_clicks(clicksDF, targetTimes = runif(n=14, min=0, max=10), nAdd=5)
  • Maintainer: Ryan Sun
  • License: GPL-3
  • Last published: 2020-11-25

Useful links