survfitDistributed: Create Survival Curves for Vertical Distributed Cox...

Description Usage Arguments Value See Also Examples

View source: R/vertical_utilities.R

Description

This function creates survival curves for a previously defined vdracox object. The function also accepts a formula and the original data supplied by the calling party allowing exploration of other potential strata. Both formula and data must be NULL or both must be specified.

Usage

1

Arguments

x

an object of type vdracox.

formula

a formula which defines alternative strata for the survival curve.

data

if formula is specified, this should be the data that was supplied by the calling party.

Value

Returns an object of class survfitDistributed. Objects of this class have methods for the functions print and plot. The following components must be included in a legitimate survfitDistributed object.

n

the total number of subjects in each curve.

time

the time points at which the curve has a step.

n.risk

the number of subjects at risk at each time point.

n.event

the number of events that occour at each time point.

n.censor

the number of subjects who are censored at each time point.

strata

the number of points in each strata.

surv

the estimate of the survival time at each time step.

type

the type of censoring. Currently, always "right".

See Also

plot.survfitDistributed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    sfit = survfitDistributed(vdra_fit_cox_A)
    print(sfit)
    plot(sfit)

    # From Data Partner 1
    sfit = survfitDistributed(vdra_fit_cox_A, ~Exposure, data = vdra_data[, c(3:4, 5:7)])
    print(sfit)
    plot(sfit)

    # From Data Partner 2
    sfit = survfitDistributed(vdra_fit_cox_B, ~Race + Sex, data = vdra_data[, 8:11])
    print(sfit)
    plot(sfit, merge = TRUE)

vdra documentation built on Sept. 9, 2021, 9:10 a.m.