jump2step: Accumulate increments in values from a step function of time

Description Usage Arguments Value See Also Examples

Description

A utility function for coxdual that returns values from a step function given its increments over time.

Usage

1
jump2step(jump, time = "time", stratum = NULL)

Arguments

jump

a matrix whose columns give increments in the (possibly multivariate) step function, corresponding time points and strata.

time

an integer or character value indicating the column index or name of the time variable in the matrix jump. Defaults to "time".

stratum

integer or character value for the column index or name of the stratifying variable in the matrix jump. If stratum is NULL (default), jump is presumed unstratified.

Value

A matrix of the same dimension as jump.

See Also

step2jump

Examples

1
2
3
4
5
fit <- coxdual(Surv(start, stop, status) ~ cluster(id)
               + trans(from, to) + z, data = dualrc, init.coxph = TRUE)
haz <- step2jump(fit$coxph$basehaz, stratum = 3)
Haz <- jump2step(haz, stratum = 3)
all(Haz == fit$coxph$basehaz)


Search within the coxinterval package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.