Questions tagged [mahalanobis]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

How to interpret the cut-off of a Mahalanobis distance in R

Making the cut-off, I see two multivariante outlieres in the plot and get 4 numbers printet in my console. (43 and 2 in the first row and 2 and 23 in the second row) What do they stand for? How can I ...
user avatar
0 votes
0 answers
32 views

Expectation of Mahalanobis Distance and its logarithm

Suppose: \begin{equation} X \sim \mathcal{N}(X, \mu, \Sigma_x) \text{ st. } \Sigma_x \sim \mathcal{IW}(\Sigma_x; \Psi, v) \end{equation} Where $\mathcal{IW}$ is the Inverse-Wishart distribution. This ...
Snowy Baboon's user avatar
2 votes
1 answer
73 views

How to obtain the (weighted or unweighted) L1 imbalance measure for "raw" data

I have two questions regarding the JASA paper, Multivariate Matching Methods That Are Monotonic Imbalance Bounding, by Iacus et al. (2011), the authors produce Figure 2 (left panel) where they compare ...
yungmist's user avatar
0 votes
0 answers
18 views

How can mahalanobis and chi2-test be used to determine of an observation is acceptable?

Assume that you have a model $$\dot x = Ax + Bu$$ $$y = Cx$$ And this model is SISO. Single input and single output. You got the mission to determine of an observation is acceptable for the kalman ...
euraad's user avatar
  • 415
9 votes
3 answers
2k views

How can this counterintiutive result with the Mahalanobis distance be explained?

I encountered a strange issue when performing Mahalanobis distance matching. Let's say I have one treated unit with the following values on two variables: $T:(17, 4)$. I have two control units with ...
Noah's user avatar
  • 33.3k
0 votes
1 answer
146 views

Evaluating the quality of matches after Mahalanobis distance matching on stata

I am new to Mahalanobis distance matching and trying to see for information on how I can assess whether the matches I got using Mahalanobis matching are good matches. ...
Alisa's user avatar
  • 5
0 votes
0 answers
34 views

Is it possible to use Mahalanobis Transformation using the data I have available?

My datasets contain of 5 regional spot electricity prices and 2 fixed electricity prices. I also have a time variable going week to week from 2010 to the end of 2021. Is there any way to use the data ...
hihixd's user avatar
  • 33
2 votes
1 answer
182 views

Would using a mahalanobis transformation be the same as standardize the variable?

I am trying to use mahalanobis transformation on a single variable that is autocorrelating with itself in a time series that goes from week to week over several years. The mahalanobis transformation ...
hihixd's user avatar
  • 33
1 vote
0 answers
151 views

Mahalanobis Distance critical alpha cutoff [closed]

I have two predictors and five dependent variables. I'm trying to figure out what the critical alpha cutoff for Mahalanobis distance is for a model with 5 DVs to check for assumption of multivariate ...
Carter's user avatar
  • 11
0 votes
1 answer
162 views

All Weights Are "1" For Mahalanobis Nearest-Neighbor Matching

When generating weights using nearest-neighbor matching with Mahalanobis distance, all of my weights for each treated and non-treated unit are "1". Below is my syntax using the ...
Brian Lookabaugh's user avatar
2 votes
1 answer
163 views

Merits of different matching & weighting methods for multiple treatments

I have three land use classes (natural farming, chemical farming, and forest) and would like to compare the densities of different bird species between them. I would like to get the ATE (I think). I ...
user372167's user avatar
0 votes
0 answers
61 views

Is it possible to apply the kernel trick to a "mahalnobis distance learner" such as GLS?

1.https://arxiv.org/pdf/0804.1441.pdf 2.https://www.sciencedirect.com/science/article/abs/pii/S0925231210001165 These papers describe kernelizing a mahalanobis distance learner. I am interested in ...
user avatar
1 vote
1 answer
48 views

in built Mahalanobis distance function gives different result

i want to calculate mahalanobis distance, from the formula and also theoretical explanation given here ...
dato datuashvili's user avatar
-1 votes
1 answer
129 views

How to (dis)prove Mahalanobis $ d^2 $ is non decreasing?

I have been studying multivariate analysis and hypothesis testing , and came across this question in back exercise Define Mahalabonis measure of distance squared between two populations with a common ...
simran's user avatar
  • 377
1 vote
0 answers
43 views

Running several hierarchical linear regressions, all have the same Mahalanobis Distance. Is this weird?

As the title says I've run several hierarchical linear regressions on SPSS and I've found that all 6 of them have the same Mahalanobis Distance. I'm wondering if this is a normal thing to happen or ...
Lewis S's user avatar
  • 11
7 votes
1 answer
937 views

Why does univariate Mahalanobis distance not match z-score?

I am using Mahalanobis distance for outlier detection. Sometimes my dataset only has 1 feature, sometimes many more. I believe the univariate Mahalanobis distance should be equal to the z-score of the ...
kwinkunks's user avatar
  • 349
-1 votes
0 answers
43 views

Gaussian distribution, Mahlanobis distance, probability [closed]

**Suppose we have a set of b variables which have x and y coordinates (bx1 by1, bx2 by2,...,bxN byN) each of which have a gaussian distribution. we also have somepoints, suppose (Ux1 Uy1, Ux2 Uy2, ......
Adil Khan's user avatar
2 votes
2 answers
576 views

Confusion on calculating Mahalanobis distance between a point and a cluster

I am slightly confused as to how you calculate Mahalanobis distance given a set of data. I have tried asking my tutor for help but he does not seem interested in helping what so ever and I am ...
ASH's user avatar
  • 143
1 vote
0 answers
158 views

Distance metric that is robust to collinearity

I'm trying to find a distance metric that takes into account the correlation between vectors. That is, suppose we have matrix $M$ of dimensions $n \times k$, and we take the pairwise distance between ...
user3037237's user avatar
4 votes
1 answer
227 views

Multivariate Chebyshev's inequality with Mahalanobis distance

In Chebyshev's inequality, we can generalize the 68-95-99.7 rule from normal distributions to bound how much density is within a certain number of standard deviations from the mean. $$ P\big( \big\...
Dave's user avatar
  • 62.4k
0 votes
0 answers
84 views

Deducing $L^1$ Boundary from Mahalanobis Boundary

Assume maximum likelihood estimators $a,b$ of size $p$, with corresponding estimated covariance matrices $V^a,V^b$. In fact $a,b$ are two regression coefficient vectors. Denote $q=a-b$ the vector of ...
Spätzle's user avatar
  • 3,930
2 votes
0 answers
187 views

About the calculation of covariance matrix in mahalanobis distance: How $W^TW$ is equal to the covariance matrix? [closed]

I was reading about deep metric learning (from here) and came across the mahalanobis distance. I understood why we can not use euclidean distance if the distribution is not isotropic (the covariance ...
Mas A's user avatar
  • 203
0 votes
0 answers
247 views

Mahalanobis vs centering / standard deviations

Is there a difference whether to use a Mahalanobis distance or transform the data via centering (and normalization) when you are interested in calculating distances? This means, if you are interested ...
Ben's user avatar
  • 3,443
1 vote
0 answers
53 views

Distance defined by second moment, akin to Mahalanobis distance?

In ordinary linear regression ($c=0$) and ridge regression ($c > 0$), for design matrix $X$ with dimensions $N$ observations by $D$ dimensions, the $N \times N$ hat matrix is given by: $$H = X (X^T ...
Rylan Schaeffer's user avatar
3 votes
1 answer
540 views

What is the covariance matrix of the normal order statistics?

I would like to test if a sample comes from a standard normal distribution. I want to do that by sorting the sample values, and measuring the Mahalanobis distance to the expected order statistics from ...
dividebyzero's user avatar
0 votes
0 answers
18 views

Why is the covariance matrix inverted in the definition of the Mahalanobis distance? [duplicate]

I'm on my first course on data science, and I encountered the Mahalanobis distance for the first time. It was mentioned that intuitively, what it does is that it corrects for the fact that some ...
maritsm's user avatar
  • 101
0 votes
0 answers
40 views

How to find 'influential points' in multivariate data with weak covariance

Part-1: I have used PCA and Mahalanobis distance to find outliers. But in both cases, only the highest or lowest values are detected as outliers. I am looking for a way that any data point that does ...
nothing to prove's user avatar
1 vote
1 answer
303 views

Mahalanobis Distance question in R

I have a question when calculating Mahalanobis Distance using R. For the Mahalanobis distance function below: mahalanobis(x, **center**, cov, inverted = FALSE, ...) ...
Rach_L's user avatar
  • 15
0 votes
0 answers
37 views

Is negative Mahalanobis distance proportional to log probability?

Is the following statement true? I was sure it was, but I was told by someone else that it is not. $$ p(\mathbf{x}_i | y_i) = \frac{1}{2\pi^{\frac{D}{2}} |\mathbf{\Sigma}_c|^{\frac{1}{2}} } e^{ -\frac{...
Joff's user avatar
  • 902
0 votes
0 answers
25 views

Effect of correlation in matching

What is the effect of correlations among observed covariates or between observed and unobserved covariates on the quality of matching, when matching iss done using Propensity score (Euclidian/...
Rakib's user avatar
  • 535
1 vote
1 answer
326 views

Is there an intuition about the matrix operations in the exponent of the multivariate normal distribution?

In the exponent of the multivariate distribution, there are 2 vectors and a square matrix multiplied together to get a scalar result: $$(\mathbf{x} - \mu)^{\text{T}}\Gamma^{-1}(\mathbf{x} - \mu)$$ ...
kreamyyy's user avatar
2 votes
3 answers
383 views

How to find the variance(s) of a bivariate normal density such that 95% of the mass is within a certain radius from the mean defined by a point A?

I would like to find the variance of a bivariate normal density (BND), centered at the mean M, such that 95% of its mass is within a certain radius, which depends on the position of a point, A. (Note: ...
Emy's user avatar
  • 290
13 votes
2 answers
11k views

What are the pros and cons of using mahalanobis distance instead of propensity scores in matching

I learned about this option of using mahalanobis distance instead of PS to do matching from the matchit() function in R. It seems a more nonparametric approach. Could you state its pros and cons and ...
hehe's user avatar
  • 733
0 votes
0 answers
396 views

Mahalanobis distance to detect multivariate outliers [duplicate]

I have to detect outliers on 3 variables. On the internet I found the mahalanobis distance but I understood I can use it only on multivariate normally distributed data, and my data isn't. So, do you ...
simo954's user avatar
0 votes
0 answers
517 views

Covariance Matrix Decomposition - Data Decorrelation

So I recently found out about Mahalanobis distance. Given a r.v $x$ in N-dimensional space, an associated metric is defined by $$M(x) = \sqrt{(x-\mu)^T S^{-1}(x-\mu)}$$ where $\mu$ and $S$ are mean ...
Aleksejs Fomins's user avatar
0 votes
1 answer
123 views

When running a multiple regression, are both dependent and independent variables scanned for outliers?

I want to run a multiple regression analysis using SPSS. I have used the Mahalanobis d square method to find outliers. However my question is, do I add the dependent variable to the list of ...
Mazen Mourad's user avatar
2 votes
1 answer
236 views

How to determine an appropriate "closeness" threshold when matching for causal inference?

Say I have a [yes/no] treatment variable (e.g. the customer complained about their order) and I want to estimate the causal impact of this "treatment" on the average customer's future spend. ...
StatStudent19's user avatar
3 votes
2 answers
372 views

direction of outlier detected by the Mahalanobis distance

Mahalanobis distance provides a value that might be used for the detection of outliers. My question: how to calculate the direction of the outlier (as a vector)? A simple answer would be to use the ...
Gideon Kogan's user avatar
1 vote
1 answer
843 views

Anomaly detection using Mahalanobis distance

I am using Mahalanobis distance to identify outliers. I am training using kind of one class classification,by training only on positive samples and trying to predict negative samples using distance ...
Minnie's user avatar
  • 13
1 vote
1 answer
53 views

Detect outliers / detect classes

Currently I have a dataset that contains several products with different prices and quantities. My goal is to detect if the given product was sold as a package or as a unit and I have used the ...
Oliver's user avatar
  • 111
0 votes
1 answer
773 views

Mahalanobis Distance for Continuous and Ordinal Covariates

My dataset of home sales includes covariates such as square_feet which are continuous and others like num_bedrooms which are in <...
taurus's user avatar
  • 125
2 votes
1 answer
346 views

Why does this formula produce $p_{2}$ probabilities for Mahalanobis distances?

At the IBM website it is written that The p1 probabilities are standard probabilities of an observation from a multivariate normal distribution being that far or further from the centroid, ...
user1205901 - Слава Україні's user avatar
0 votes
0 answers
76 views

Equivalence between Mahalanobis distance and PCA (mathematical proof) [duplicate]

From this article and this post it emerges the strong connection between Mahalanobis distance and PCA. In particular in the first article I reference it says: " the squared Mahalanobis distance is ...
gioxc88's user avatar
  • 1,200
0 votes
1 answer
344 views

Discordance between various methods of multivariate outliers detection

Here is a small "toy example" dataset, with 15 individuals described by 6 variables (this is R language): ...
Philopolis's user avatar
3 votes
2 answers
2k views

Understanding the R stats mahalanobis() function's Output

An acquaintance recommended I use the Mahalanobis distance on my data instead of Euclidean, Manhattan, etc. I tried using the mahalanobis() function in the R stats package on a data matrix with N ...
lrthistlethwaite's user avatar
2 votes
0 answers
131 views

Determine outliers for robust Mahalanobis distance

I want to apply a robust mahal distance and found an implementation in scikit. but there is the number of outliers already given in advance. For me, who wants to find out the number of outliers, this ...
Ben's user avatar
  • 3,443
5 votes
2 answers
594 views

Something like Mahalanobis distance when the copula is not Gaussian

Mahalanobis distance accounts for different variances of the marginal variables and correlations between the marginal variables. However, there is an implicit (maybe explicit) assumption that ...
Dave's user avatar
  • 62.4k
1 vote
0 answers
863 views

Mahalanobis distance between 2 points doesn't work when covariance matrix has values close to 0 [duplicate]

I am working on a project where I am trying to replicate a randomized experiment from an observational study data, using Mahalanobis distance matching to ensure that the control and treated groups are ...
stats_nerd's user avatar
9 votes
2 answers
2k views

Is there a version of the Mahalanobis distance for matrices?

I'm working on a computer vision problem and I want to use the Mahalanobis distance to cluster image patches (2D matrices having the same dimensions). I haven't been able to find any generalisation up ...
vphenix's user avatar
  • 527
1 vote
0 answers
111 views

How can I use factor analysis to identify variables that contribute most to Mahalanobis distance?

I have 400 samples chemically analysed for 48 elements. Some elements are correlated. My goal is to identify outliers in a multivariate space, samples that are unique in their composition. I compute ...
Heiko's user avatar
  • 11