Title: | Matching on Poset-Based Average Rank for Multiple Treatments (MARMoT) |
---|---|
Description: | It contains the function to apply MARMoT balancing technique discussed in: Silan, Boccuzzo, Arpino (2021) <DOI:10.1002/sim.9192>, Silan, Belloni, Boccuzzo, (2023) <DOI:10.1007/s10260-023-00695-0>; furthermore it contains a function for computing the Deloof's approximation of the average rank (and also a parallelized version) and a function to compute the Absolute Standardized Bias. |
Authors: | Alberto Calore [aut, cre], Pietro Belloni [aut], Margherita Silan [aut] |
Maintainer: | Alberto Calore <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.0.4 |
Built: | 2024-11-14 04:44:22 UTC |
Source: | https://github.com/albertocalore/marmot |
Compute the absolute standardized bias of given confounders and return some useful statistics.
ASB(data, confounders, treatment, verbose = TRUE)
ASB(data, confounders, treatment, verbose = TRUE)
data |
A dataframe or equivalent. |
confounders |
A vector with the column names of the confounders to balance by. |
treatment |
A string with the column name of the treatment variable. |
verbose |
Set to FALSE to suppress any console output. Default is TRUE |
A list of objects, containing the ASB matrix and some summary statistics.
ASB(data = MARMoT_data, confounders = c("race", "age"), treatment = "hospital")
ASB(data = MARMoT_data, confounders = c("race", "age"), treatment = "hospital")
Compute the average with using Deloof's approximation.
deloof(comparable_data)
deloof(comparable_data)
comparable_data |
A dataframe or equivalent, which columns are ordered factors or numeric variables. |
A vector containing the average rank of all observations (it is recommended to normalized it before use).
Caperna, G., 2019. Approximation of AverageRank by means of a formula. https://doi.org/10.5281/zenodo.2565699
AR = deloof(deloof_data)
AR = deloof(deloof_data)
A very simple example dataset
deloof_data
deloof_data
deloof_data
A data frame with 8,450 rows and 2 columns:
our partially ordered variables
Created in-house to serve as an example
Matching on poset-based average rank for multiple treatments (MARMoT).
MARMoT( data, confounders, treatment, reference = "median", n.cores = 1, caliper = 0.25, verbose = TRUE )
MARMoT( data, confounders, treatment, reference = "median", n.cores = 1, caliper = 0.25, verbose = TRUE )
data |
A dataframe or equivalent. |
confounders |
A vector containing the column names of the confounders to balance by. |
treatment |
A string indicating the column name of the treatment variable. |
reference |
The statistic used to determine the reference frequencies in the balancing process. Default is median. |
n.cores |
Number of cores to be used (Linux and Mac systems only!); if a number grater than 1 is specified the function will use a parallelized version of the deloof approximation. Default set to 1. |
caliper |
Fraction of the standard deviation used to determine the closest neighbour. Default is 0.25. |
verbose |
Set to FALSE to suppress any console output. Default is TRUE |
There are many scenarios where classic propensity score techniques are not applicable (e.g. there are many treatments). In a multiple-treatment framework, MARMoT is a method to balance the distribution of covariates among several treatment groups. MARMoT introduces a method for achieving balance among treatment groups by utilizing partially ordered set (poset) theory. This approach focuses on equalizing individual characteristics without relying on propensity score techniques or a dependent variable. Unlike propensity score methods, poset theory doesn't require assumptions about model specifications for treatment allocation. Each subject is represented by a profile of their characteristics, and an average rank approximation is associated with each profile. This value represents the significance of individual characteristics for treatment allocation and can be normalized for better interpretability.
A list of objects, also containing the balanced dataset with the same structure of the input dataset.
Silan, M., Boccuzzo, G. and Arpino, B., 2021. 'Matching on posetābased average rank for multiple treatments to compare many unbalanced groups'. Statistics in Medicine, 40(28), pp.6443-6458. https://doi.org/10.1002/sim.9192
Silan, M., Belloni, P. and Boccuzzo, G., 2023. 'Identification of neighborhood clusters on data balanced by a poset-based approach'. Statistical Methods & Applications, pp.1-22. https://doi.org/10.1007/s10260-023-00695-0
out = MARMoT(data = MARMoT_data, confounders = c("race", "age"), treatment = "hospital", n.cores = 1) out
out = MARMoT(data = MARMoT_data, confounders = c("race", "age"), treatment = "hospital", n.cores = 1) out
An example dataset where our treatment is the hospital structure.
MARMoT_data
MARMoT_data
MARMoT_data
A data frame with 8450 rows and 3 columns:
our treatment
our confounders
Created in-house to serve as an example
Compute the average with using Deloof's approximation, using parallel computing; it can be used only on Linux and Mac systems!
mcdeloof(comparable_data, n.cores)
mcdeloof(comparable_data, n.cores)
comparable_data |
A dataframe or equivalent, which columns are ordered factors or numeric variables. |
n.cores |
Number of cores to be used. |
A vector containing the average rank of all the observations (it is recommended to normalized it before use).
Caperna, G., 2019. Approximation of AverageRank by means of a formula. https://doi.org/10.5281/zenodo.2565699
AR = mcdeloof(deloof_data, n.cores = 1)
AR = mcdeloof(deloof_data, n.cores = 1)