dichotomize: Dichotomize time-to-event data

Description Usage Arguments Details Value Author(s) See Also

Description

Convert time-to-event data (typically created with the Surv function) to factor or integer.

Usage

1
dichotomize(x, time, to_factor)

Arguments

x

Surv vector.

time

Time point to dichotomize at.

to_factor

Depending on the type of x the return value may be integer or factor. Set this argument to explicitly state the return type.

Details

If no time point is given the observation times will be stripped, leaving only the event types. If a time point is given observations with events occurring before time will be labelled by their event type, observations with events occurring after time will be labelled as “no event”, and observations censored before time will be considered as missing information.

Value

Integer vector or factor.

Author(s)

Christofer Bäcklin

See Also

Surv



Search within the emil 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.