smahal: Compute rank-based Mahalanobis distance matrix between each...

View source: R/nearfar.R

smahalR Documentation

Compute rank-based Mahalanobis distance matrix between each pair

Description

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.

Usage

smahal(X)

Arguments

X

A matrix of observed confounders with n rows (observations) and p columns (variables)

Value

Returns the rank-based Mahalanobis distance matrix between every pair of observations

Examples

smahal(mtcars[1:4, 2:3])

nearfar documentation built on May 29, 2024, 3:10 a.m.