fup_stats: Calculate follow up statistics

View source: R/fup_stats.R

fup_statsR Documentation

Calculate follow up statistics

Description

Calculate median follow up time (reverse KM method) and C index for follow up completeness.

Usage

fup_stats(
  time = NULL,
  status = NULL,
  strata = NULL,
  time_unit = c("days", "weeks", "months", "years"),
  time_by = NULL
)

Arguments

time

Follow up (in days?)

status

event indicator

strata

group

time_unit

Time unit table returned

time_by

Time step for completeness table axis (in days)

cutoff

(in days?)

References

Clark T., Altman D., De Stavola B. (2002), Quantification of the completeness of follow-up. Lancet 2002; 359: 1309-10

Examples


time   <- c(180,  12, 240, 250 )
status <- c(  0,   1,   0,   1 )
group  <- c("A", "A", "B", "B" )

## example: 
## quantify fup completeness to 200 days (eg minimum potential
## follow up in a hypotethic prospective trial)

fup_stats(time = time, status = status, strata = group, time_by = 10)

time2   <- as.numeric(1:(365*3 + 1))
status2 <- rep(c(0,1), 548) 
fup_stats(time = time2, status = status2, time_unit = 'year')


lbraglia/lbsurv documentation built on June 19, 2022, 11:13 p.m.