| HTESepT | R Documentation |
Performs separate analyses of heterogeneous treatment effects at each selected time point.
HTESepT(
data,
ps_fo,
prin_fo,
out_fo,
target_time,
B,
conf_level = 0.95,
max_attempts = NULL,
verbose = TRUE,
progress_callback = NULL
)
data |
Data prepared by |
ps_fo |
propensity score model formula |
prin_fo |
principal score model formula |
out_fo |
outcome mean model formula |
target_time |
A non-empty numeric vector containing timepoints of interest in standardized form. Baseline is allowed. |
B |
Number of bootstrap replications. Use |
conf_level |
The confidence level for Wald intervals calculated from bootstrap standard errors. |
max_attempts |
The maximum number of resampling attempts allowed to
obtain |
verbose |
If |
progress_callback |
An optional function for receiving bootstrap
progress updates. It is called before model fitting, after the point
estimate, after every bootstrap attempt, and when bootstrapping finishes.
Each update is a named list containing
|
HTESepT() combines predictions from the propensity score, principal score,
and outcome mean models to form the data used for effect estimation. It fits
a separate treatment-effect model at each selected time and, when requested,
uses bootstrap resampling to calculate confidence intervals.
A pd_hte_timevarying object containing the estimate for each
requested time, confidence intervals when B > 0, model-checking
information, and a summary of successful and failed bootstrap attempts.
Displayed estimates are rounded to three decimal places; boot_mat stores
the unrounded bootstrap coefficients.
Propensity scores are limited to [0.01, 0.99]. Their product with estimated
survival probabilities under treatment 1 is limited to [0.005, 0.995]
when effects are estimated. These limits prevent division by probabilities
very close to zero, but they can affect the estimates and do not demonstrate
adequate overlap or validate the causal assumptions. Review the returned
model information, especially when few subjects remain at risk.
The implemented estimator uses treatment 1 as the survival-favorable arm:
potential survival satisfies S^1 \ge S^0 at cutoff. Its always-survivor
principal score is therefore the survival probability under treatment 0.
If the survival-favorable arm is coded as 0 in the raw data,
recode the raw treatment as 1 - A before mapping and
standardizing. To report the original contrast, negate the package estimate
and transform an interval [lower, upper] to [-upper, -lower].
Mapping() does not infer or reverse treatment coding.
PDRobust-package, pd_methods
data("BiSample", package = "PDRobust")
map <- Mapping(
id = "id", time = "time", treatment = "A",
survival = "S", outcome = "Y",
baseline_time = 0, cutoff_time = 2,
covariates = c("X1", "X2", "X4"),
interest_vars = c("X1", "X2"), y_type = "B"
)
pd_dat <- DataStandard(BiSample, map)
fit <- HTESepT(
pd_dat,
A ~ X1 + X2 + X4,
S ~ X1 + X2 + X4 + A + time,
Y ~ X1 + X2 + A,
target_time = c(0, 2), B = 0
)
fit$summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.