maic_anchored {maicplus} | R Documentation |
Anchored MAIC for binary and time-to-event endpoint
Description
This is a wrapper function to provide adjusted effect estimates and relevant statistics in anchored case (i.e. there is a common comparator arm in the internal and external trial).
Usage
maic_anchored(
weights_object,
ipd,
pseudo_ipd,
trt_ipd,
trt_agd,
trt_common,
trt_var_ipd = "ARM",
trt_var_agd = "ARM",
normalize_weights = FALSE,
endpoint_type = "tte",
endpoint_name = "Time to Event Endpoint",
eff_measure = c("HR", "OR", "RR", "RD"),
boot_ci_type = c("norm", "basic", "stud", "perc", "bca"),
time_scale = "months",
km_conf_type = "log-log",
binary_robust_cov_type = "HC3"
)
Arguments
weights_object |
an object returned by |
ipd |
a data frame that meet format requirements in 'Details', individual patient data (IPD) of internal trial |
pseudo_ipd |
a data frame, pseudo IPD from digitized KM curve of external trial (for time-to-event endpoint) or from contingency table (for binary endpoint) |
trt_ipd |
a string, name of the interested investigation arm in internal trial |
trt_agd |
a string, name of the interested investigation arm in external trial |
trt_common |
a string, name of the common comparator in internal and external trial |
trt_var_ipd |
a string, column name in |
trt_var_agd |
a string, column name in |
normalize_weights |
logical, default is |
endpoint_type |
a string, one out of the following "binary", "tte" (time to event) |
endpoint_name |
a string, name of time to event endpoint, to be show in the last line of title |
eff_measure |
a string, "RD" (risk difference), "OR" (odds ratio), "RR" (relative risk) for a binary endpoint;
"HR" for a time-to-event endpoint. By default is |
boot_ci_type |
a string, one of |
time_scale |
a string, time unit of median survival time, taking a value of 'years', 'months', 'weeks' or
'days'. NOTE: it is assumed that values in TIME column of |
km_conf_type |
a string, pass to |
binary_robust_cov_type |
a string to pass to argument |
Details
It is required that input ipd
and pseudo_ipd
to have the following
columns. This function is not sensitive to upper or lower case of letters in column names.
USUBJID - character, unique subject ID
ARM - character or factor, treatment indicator, column name does not have to be 'ARM'. User specify in
trt_var_ipd
andtrt_var_agd
For time-to-event analysis, the follow columns are required:
EVENT - numeric,
1
for censored/death,0
otherwiseTIME - numeric column, observation time of the
EVENT
; unit in days
For binary outcomes:
RESPONSE - numeric,
1
for event occurred,0
otherwise
Value
A list, contains 'descriptive' and 'inferential'
Examples
# 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