Description Usage Arguments Value Examples
This function computes the rank-based Mahalanobis distance matrix
between each pair of observations in the data set. Called by
matches
(and ultimately opt_nearfar
)
function to set up a distance matrix used to create pair matches.
1 | smahal(X)
|
X |
A matrix of observed confounders with n rows (observations) and p columns (variables) |
Returns the rank-based Mahalanobis distance matrix between every pair of observations
1 |
Loading required package: nbpMatching
Notice:
Formerly the gendistance() function scaled the Mahalanobis distances into large
integers, as required by the nonbimatch() function. Starting in version 1.5.0,
gendistance() will return unscaled distances. This facilitates comparison to an
appropriate F distribution for multivariate normal data. Any required scaling
will happen invisibly within nonbimatch(). This notice will be removed in a
future version of nbpMatching.
[,1] [,2] [,3] [,4]
[1,] 0.000000 0.000000 2.431837 4.050000
[2,] 0.000000 0.000000 2.431837 4.050000
[3,] 2.431837 2.431837 0.000000 5.763674
[4,] 4.050000 4.050000 5.763674 0.000000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.