add_clicks: Add clicks to subdistribution curves for reconstructing CIC

Description Usage Arguments Value Examples

View source: R/add_clicks.R

Description

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.

Usage

1
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.

Value

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

Examples

1
2
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)

reconstructKM documentation built on Nov. 25, 2020, 5:08 p.m.