CalculateBalance: Calculate balance of covariates before and after matching.

Description Usage Arguments Value

View source: R/CalculateBalance_function.R

Description

Function that calculates the standardized difference of means.

Usage

1
2
CalculateBalance(dtaBef, dtaAfter = NULL, cols, trt,
  diff_means = FALSE)

Arguments

dtaBef

Data frame including the data before matching.

dtaAfter

Data frame including only the matched pairs data. Can be set to NULL if we want to calculate the standardized difference of means for only one dataset.

cols

Column indeces of the variables we want to check. Should be the same in both dtaBef and dtaAfter

trt

Column index for treatment variable.

diff_means

Logical. Set equal to TRUE to return the difference in means of treated versus controls. Defaults to FALSE.

Value

A 2 by length(cols) matrix with the standardized difference of means before and after matching. (Second row is empty if dtaAfter is not given.)


gpapadog/DAPSm documentation built on May 17, 2019, 8 a.m.