DRtransform: Doubly robust transformation

View source: R/SDRreg.R

DRtransformR Documentation

Doubly robust transformation

Description

Given a pred_event_censor object in a time window, calculates the doubly robust transformation in the time window. The transformation is used as the outcome when estimating the conditional survival probability at the next visit time.

Usage

DRtransform(
  follow.up.time,
  pred_event_censor_obj,
  tvals,
  next.visit.time = Inf,
  id.var,
  time.var,
  event.var,
  denom.survival.trunc
)

Arguments

follow.up.time

see SDRsurv

pred_event_censor_obj

a pred_event_censor object in the time window of interest

tvals

see SDRsurv. Must be sorted in ascending order and all greater than the smallest time in pred_event_censor_obj

next.visit.time

the next visit time. Default is Inf, corresponding to the last time window

id.var

see SDRsurv

time.var

see SDRsurv

event.var

see SDRsurv

denom.survival.trunc

see SDRsurv

Value

a named matrix of transformations used for regression. Each row corresponds to an individual; each column corresponds to a value of tvals. Row names are elements in follow.up.time$id.var; column names are values of tvals.

Warning

This function is designed to be called by other functions such as SDRsurv, therefore inputs are not thoroughly checked. Incorrect inputs may lead to errors with non-informative messages. The user may call this function if more flexibility is desired.


QIU-Hongxiang-David/SDRsurv documentation built on March 29, 2024, 8:41 a.m.