Gtransform | R Documentation |
Given a pred_surv
object for time to event in a time window, calculates the G-computation transformation in the time window. The transformation is used as the outcome when estimating the conditional survival probability at the next visit time.
Gtransform(
follow.up.time,
pred_event_obj,
tvals,
next.visit.time = Inf,
id.var,
time.var,
event.var
)
follow.up.time |
see |
pred_event_obj |
a |
tvals |
see |
next.visit.time |
the next visit time. Default is |
id.var |
see |
time.var |
see |
event.var |
see |
denom.survival.trunc |
see |
a named matrix of transformations. 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
.
This function is designed to be called by other functions such as Gsurv
, 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.