Compute pairwise distance matrix
Arguments
- left_mat
Numeric matrix of left units (rows = units, cols = variables).
- right_mat
Numeric matrix of right units (rows = units, cols = variables).
- distance
Character string specifying distance metric, or a function.
- sigma
Optional covariance matrix for Mahalanobis distance. If NULL (default), the pooled covariance is estimated from data.