Package 'MARMoT'

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

Help Index


Absolute standardized bias

Description

Compute the absolute standardized bias of given confounders and return some useful statistics.

Usage

ASB(data, confounders, treatment, verbose = TRUE)

Arguments

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

Value

A list of objects, containing the ASB matrix and some summary statistics.

Examples

ASB(data = MARMoT_data, confounders = c("race", "age"), treatment = "hospital")

Average rank with Deloof's approximation

Description

Compute the average with using Deloof's approximation.

Usage

deloof(comparable_data)

Arguments

comparable_data

A dataframe or equivalent, which columns are ordered factors or numeric variables.

Value

A vector containing the average rank of all observations (it is recommended to normalized it before use).

References

Caperna, G., 2019. Approximation of AverageRank by means of a formula. https://doi.org/10.5281/zenodo.2565699

Examples

AR = deloof(deloof_data)

Data to showcase deloof and mcdeloof functions

Description

A very simple example dataset

Usage

deloof_data

Format

deloof_data

A data frame with 8,450 rows and 2 columns:

comorbidities, age

our partially ordered variables

Source

Created in-house to serve as an example


MARMoT balancing method

Description

Matching on poset-based average rank for multiple treatments (MARMoT).

Usage

MARMoT(
  data,
  confounders,
  treatment,
  reference = "median",
  n.cores = 1,
  caliper = 0.25,
  verbose = TRUE
)

Arguments

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

Details

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.

Value

A list of objects, also containing the balanced dataset with the same structure of the input dataset.

References

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

Examples

out = MARMoT(data = MARMoT_data, confounders = c("race", "age"),
             treatment = "hospital", n.cores = 1)
out

Data to showcase MARMoT and ASB functions

Description

An example dataset where our treatment is the hospital structure.

Usage

MARMoT_data

Format

MARMoT_data

A data frame with 8450 rows and 3 columns:

hospital

our treatment

race, age

our confounders

Source

Created in-house to serve as an example


Average rank with Deloof's approximation (parallel computing)

Description

Compute the average with using Deloof's approximation, using parallel computing; it can be used only on Linux and Mac systems!

Usage

mcdeloof(comparable_data, n.cores)

Arguments

comparable_data

A dataframe or equivalent, which columns are ordered factors or numeric variables.

n.cores

Number of cores to be used.

Value

A vector containing the average rank of all the observations (it is recommended to normalized it before use).

References

Caperna, G., 2019. Approximation of AverageRank by means of a formula. https://doi.org/10.5281/zenodo.2565699

Examples

AR = mcdeloof(deloof_data, n.cores = 1)