View source: R/check_matching.R
check_matching | R Documentation |
Check Whether the Variables are Balanced After Weighting
ipds_wts |
A data frame containing individual patient data from the
intervention study, with a column containing the estimated weights (derived
using |
agds |
A data frame containing aggregate summary data from the comparator study. |
summary.list |
A character list with two elements giving the names of variables for summarizing: the first is a vector of binary variables, and the second is a vector of continuous variables. The variable names must match the column names in ipds and do not need to be the same as those in matching.list. Use c() if a type is absent. |
matching.list |
A character list with two elements giving the names of variables for matching: the first is a vector of binary variables, and the second is a vector of continuous variables. The variable names must match the column names in ipds and agds. Use c() if a type is absent. |
intervention.arm |
The name of the grouping column in the data frame
specified by ipds, e.g., |
comparator |
The name of the study column in the data frame specified
by agds, e.g., |
comparator.study |
A character specifying the comparator study, which
must be quoted and cannot be empty (e.g., |
comparator.arm |
The name of the grouping column in the data frame
specified by agds, e.g., |
comparator.n |
The name of the subjects number column in the data frame
specified by agds, e.g., |
wt.col |
The name of the estimated weights column in the data frame
specified by ipds_wts. The default is |
A data frame containing all specified variables summarised before and after weighting.
cov <- list(
binary = c("ECOG", "SMK", "METBRAIN"),
continuous = c("BMI", "DIAG")
)
cov_all <- list(
binary = c("SEX", "ECOG", "SMK", "METBRAIN", "METLIVER"),
continuous = c("BMI", "DIAG", "WEIGHT", "HEIGHT")
)
baseline <- check_matching(
ipds_wts = pts, agds = AgD_bl,
summary.list = cov_all, matching.list = cov,
intervention.arm = TRT,
comparator = STUDY, comparator.study = "Study XX-1",
comparator.n = N, comparator.arm = TRT)
baseline
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.