mdis_grps: mdis_grps: Matrix algebra in base R for covariate balance...

Description Usage Arguments Value Examples

View source: R/mdis_rman.R

Description

This function will compute M-distance for two datasets by covariate means

Usage

1
mdis_grps(x_t, x_c)

Arguments

x_t

a dataframe or matrix class object, all numeric

x_c

a dataframe or matrix class object, all numeric

Value

a numeric vector of length one, the M-distance multiplied by a constance for sample size

Examples

1
2
3
4
5
require(jumble)
df_t <- jumble::ACTG175[ACTG175$arms==1, c('age', 'gender', 'race', 'msm')]
df_c <- jumble::ACTG175[ACTG175$arms==0, c('age', 'gender', 'race', 'msm')]

mdis_grps(df_t, df_c)

kmcconeghy/jumble documentation built on Jan. 8, 2020, 8:52 a.m.