Create an object that represents contrast of potential outcomes by treatment arms, strata or time points.
PSContrast(
outcome,
S = NULL,
Z = NULL,
T = NULL,
type = c("all", "sequential", "cycle")
)
An S3 object of class PSContrast
and PSOutcome
, containing
A num_strata * num_treatment * num_iter array of contrast if the outcome type is non-survival or a num_strata * num_treatment * num_time_points * num_iter array of contrast if the outcome type is survival.
A boolean value, whether the outcome type is survival.
The time points at which the outcome is evaluated, if the outcome type is survival.
The S3 method summary
and plot
can be applied to the returned object.
an object of class PSoutcome
or PSContrast
a vector denoting which strata to take contrasts. Default is NULL
indicating
no contrasts are taken. Set to `TRUE` to take contrasts between all strata.
a vector denoting which treatment arms to take contrasts. Default is NULL
indicating
no contrasts are taken. Set to `TRUE` to take contrasts between all treatment arms.
a vector denoting which time points to take contrasts. Default is NULL
indicating
no contrasts are taken. Set to `TRUE` to take contrasts between all time points. This is used
only when `object` is obtained under survival outcome.
Either "all"
(default), "sequential"
or "cycle"
.
If "all"
, every pairwise contrasts are taken.
If "sequential"
, contrasts are taken over every consecutive pairs.
If "cycle"
, contrasts are taken over every consecutive pairs and also between the
first and the last levels.