# Anchored example using maic_anchored for time-to-event data
data(weighted_twt)
data(adtte_twt)
data(pseudo_ipd_twt)
result_tte <- maic_anchored(
weights_object = weighted_twt,
ipd = adtte_twt,
pseudo_ipd = pseudo_ipd_twt,
trt_var_ipd = "ARM",
trt_var_agd = "ARM",
trt_ipd = "A",
trt_agd = "B",
trt_common = "C",
endpoint_name = "Overall Survival",
endpoint_type = "tte",
eff_measure = "HR",
time_scale = "month",
km_conf_type = "log-log",
)
result_tte$descriptive$summary
result_tte$inferential$summary
# Anchored example using maic_anchored for binary outcome
data(weighted_twt)
data(adrs_twt)
# Reported summary data
pseudo_adrs <- get_pseudo_ipd_binary(
binary_agd = data.frame(
ARM = c("B", "C", "B", "C"),
RESPONSE = c("YES", "YES", "NO", "NO"),
COUNT = c(280, 120, 200, 200)
),
format = "stacked"
)
# inferential result
result_binary <- maic_anchored(
weights_object = weighted_twt,
ipd = adrs_twt,
pseudo_ipd = pseudo_adrs,
trt_var_ipd = "ARM",
trt_var_agd = "ARM",
trt_ipd = "A",
trt_agd = "B",
trt_common = "C",
endpoint_name = "Binary Event",
endpoint_type = "binary",
eff_measure = "OR"
)
result_binary$descriptive$summary
result_binary$inferential$summary
Run the code above in your browser using DataLab