# CrossMST: Covariate balance checking through the minimum spanning tree In BalanceCheck: Balance Check for Multiple Covariates in Matched Observational Studies

## Description

This function tests whether covariates in a treatment group and a matched control group are balanced in observational studies through the minimum spanning tree constructed on the subjects.

## Usage

 `1` ```CrossMST(distM,treated.index,perm=0,k=1,discrete.correction=TRUE) ```

## Arguments

 `distM` The distance matrix for the pooled observations (pooled over the treated subjects and the matched controls). If there are n treated subjects and n matched controls, then this distance matrix is a 2n by 2n matrix with the [i,j] element the distance between observation i and observation j. What distance to use is decided by users. Some simple choices are the Euclidean distance, L1 distance, and mahalanobis distance. `treated.index` The subject indices of the treated subjects. The subjects are ordered in the same way as for calculating the distance matrix, distM. `perm` The number of permutations performed to calculate the p-value of the test. The default value is 0, which means the permutation is not performed and only approximate p-value based on asymptotic theory is provided. Doing permutation could be time consuming, so be cautious if you want to set this value to be larger than 10,000. `k` Set as positive integer values, indicates k-MST is used. `discrete.correction` When this is set as TRUE (recommended), a continuation correction is done for computing the asymptotic p-value to account for the discrete nature of the statistic.

## Value

 `test.stat.Z` The standardized test statistic (ZR in the reference paper. `pval.appr` The approximated p-value based on asymptotic theory. `pval.perm` The permutation p-value when argument 'perm' is positive.

## References

Chen, H. and Small, D. (2019) New multivariate tests for assessing covariate balance in matched observational studies.

`CrossNN`

## Examples

 ```1 2 3 4 5 6 7 8``` ```## A snippet of the smoking example in the reference paper. ## smoking.rda contains a 300 by 300 distance matrix, smokingDist. ## The indices of the treated subjects are 1:150. data(smoking) CrossMST(smokingDist, 1:150) ## Uncomment the following line to get permutation p-value with 1,000 permutations. # CrossMST(smokingDist, 1:150, perm=1000) ```

### Example output

```\$test.stat.R
 88

\$test.stat.Z
 2.379564

\$pval.appr
 0.01712261
```

BalanceCheck documentation built on May 1, 2019, 7:17 p.m.