as.data.table.prodlim: Turn prodlim objects into a 'data.table'

View source: R/as.data.table.prodlim.R

as.data.table.prodlimR Documentation

Turn prodlim objects into a data.table

Description

Collect results of a fitted prodlim object in a data.table

Usage

## S3 method for class 'prodlim'
as.data.table(x, keep.rownames = FALSE, ...)

Arguments

x

object obtained with function prodlim

keep.rownames

Not used

...

passed to summary.prodlim

Details

By default object contains results for all fitted time points and all strata. Use arguments times and newdata of summary.prodlim to subset.

Value

A data.table with the results of the prodlim object

Author(s)

Thomas A. Gerds <tag@biostat.ku.dk>

See Also

prodlim, data.table

Examples

library(data.table)
set.seed(8)
d <- SimCompRisk(17)
fit <- prodlim(Hist(time,event)~X1,data=d)
as.data.table(fit)


tagteam/prodlim documentation built on April 13, 2025, 7:18 a.m.