extractOneGroupOneEvent {survCurve}R Documentation

Extracts one group and one event of a survfit model as a data frame.

Description

This function is a helper function for the package and is not exported.

Usage

extractOneGroupOneEvent(model, group = NA, event = NA, firstRow = TRUE)

Arguments

model

A survfit object.

group

Number of the chosen group. If the model-object has only one Strata (Group), this parameter can be NA.

event

If the model-object is a multistate-model, the event-type needs to be specified, otherwise it can be NA.

firstRow

Typically, a survfit-model does not include data of time=0, if true this function tries to add a column time=0 as a first row.

Value

Returns a data frame with the times, estimate, upper and lower CI and the n.Risk of one group and one event of a Kaplan Meier estimator or a competitive risk analysis


[Package survCurve version 1.0 Index]