add_matches_columns: Create Additional Columns for the Matches Dataset

View source: R/utility_functions.R

add_matches_columnsR Documentation

Create Additional Columns for the Matches Dataset

Description

This function takes a dataframe containing match information and adds additional columns to indicate the match rank, total matches for a given treatment ID, treatment weight, control matches, and control weight.

Usage

add_matches_columns(matches)

Arguments

matches

Dataframe containing the matches from comparison_pool. Each row represents a match, and there should be columns for 'treat_id' and possibly 'control_id' if control matches are to be calculated.

Value

A dataframe containing the original match information along with additional columns: 'match_rank', 'total_matches', 'treatment_weight', 'control_matches', and 'control_weight'.

Examples

 
print('See add_balance_table for full example')



RTIInternational/rollmatch documentation built on Feb. 17, 2024, 2:31 p.m.