expprep2 function

expprep2 function

expprep2 function

Helper calculation function using C code. Saved also as exp_prep (unexported function).

expprep2( x, y, ratetable, status, times, fast = FALSE, ys, prec, cmp = F, netweiDM = FALSE )

Arguments

  • x: matrix of demographic covariates - each individual has one line
  • y: follow-up time for each individual (same length as nrow(x))
  • ratetable: rate table used for calculation
  • status: status for each individual (same length as nrow(x)!), not needed if we only need Spi, status needed for rs.surv
  • times: times at which we wish to evaluate the quantities, not needed if we only need Spi, times needed for rs.surv
  • fast: for mpp method only
  • ys: entry times (if empty, individuals are followed from time 0)
  • prec: deprecated
  • cmp: should cmpfast.C be used
  • netweiDM: should new netwei script be used

Returns

List containing the calculated hazards and probabilities using the population mortality tables.

Details

Helper function used in rs.surv and other relsurv functions.

See Also

rs.surv

  • Maintainer: Damjan Manevski
  • License: GPL (>= 2)
  • Last published: 2025-01-28

Useful links