PSContrast {PStrata} | R Documentation |
Contrast of potential outcome for principal stratification analysis
Description
Create an object that represents contrast of potential outcomes by treatment arms, strata or time points.
Usage
PSContrast(
outcome,
S = NULL,
Z = NULL,
T = NULL,
type = c("all", "sequential", "cycle")
)
Arguments
outcome |
an object of class |
S |
a vector denoting which strata to take contrasts. Default is |
Z |
a vector denoting which treatment arms to take contrasts. Default is |
T |
a vector denoting which time points to take contrasts. Default is |
type |
Either |
Value
An S3 object of class PSContrast
and PSOutcome
, containing
outcome_array |
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. |
is.survival |
A boolean value, whether the outcome type is survival. |
time_points |
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.