Learn R Programming

incubate (version 1.4.0)

prepResponseVar: Check and prepare the survival response(s)

Description

Allowed censoring types are right-, left-, and interval-censoring. If y0 is not NULL this function will return either both numeric, non-Surv or both Surv-objects of the same type.

Usage

prepResponseVar(x0, y0 = NULL, simplify = TRUE)

Value

a list of the two responses, either both as survival::Surv or plain numeric (if no censorings and simplify=TRUE)

Arguments

x0

response as numeric or survival::Surv using left, right or interval-coding

y0

response as numeric or survival::Surv using left, right or interval-coding

simplify

logical. Should the result be as simple as possible? If FALSE, result will be in any case survival::Surv objects.