R/mdis_rman.R
mdis_grps.RdThis function will compute M-distance for two datasets by covariate means
mdis_grps(x_t, x_c)
| x_t | a dataframe or matrix class object, all numeric |
|---|---|
| x_c | a dataframe or matrix class object, all numeric |
a numeric vector of length one, the M-distance multiplied by a constance for sample size
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)#> [1] 0.00539505