psrwe_survkm: PS-Integrated Kaplan-Meier Estimation

View source: R/psrwe_survkm.R

psrwe_survkmR Documentation

PS-Integrated Kaplan-Meier Estimation

Description

Estimate the mean of a survival outcome at a given time point based on PS-integrated Kaplan-Meier approach. Variance is estimated by Jack-Knife method. Applies to the case when there is only one external data source.

Usage

psrwe_survkm(dta_psbor, v_time = "time", v_event = "event", pred_tp = 1, ...)

Arguments

dta_psbor

A class PSRWE_BOR object generated by psrwe_borrow.

v_time

Column name corresponding to event time

v_event

Column name corresponding to event status

pred_tp

Time of interest (e.g., 1 year)

...

Additional Parameters.

Value

A data frame with class name PSRWE_RST. It contains the composite estimation of the mean for each stratum as well as the jackknife estimation. The results should be further summarized by its S3 method summary.

Examples

data(ex_dta)
dta_ps <- psrwe_est(ex_dta,
       v_covs = paste("V", 1:7, sep = ""),
       v_grp = "Group",
       cur_grp_level = "current")
ps_borrow <- psrwe_borrow(total_borrow = 30, dta_ps)
rst       <- psrwe_survkm(ps_borrow,
                           v_time = "Y_Surv",
                           v_event = "Status")
rst


psrwe documentation built on March 18, 2022, 5:33 p.m.