Hi everyone, I am wondering how to find the matched observation with nearest Mahalanobis distance.
Saying I have 50 schools (50 rows in my data) , with 5 continuous variables(X1-X5) in each row , indicating the 5 aspects of each school.
I chose 10 schools,saying A1-A10, as the treated school from the 50 schools randomly.
Then I would like to find the corresponding matched school (saying B1- B10) for each treated school .
For each pair of schools , they have the nearest Mahalanobis distance in terms of the 5 aspects of the school,X1-X5, meaning that the distance( with regard to X1-X5) is the nearest between B1 and A1 than the distance between any other school and A1.
How could I find all the matched schools ?
Thank you~
Related Posts with How to find the matched observation with nearest Mahalanobis distance?
Cluster ValidationDear Stata users, I was wondering whether there are any options to perform cluster validation in Sta…
Mechanics of FE in DiD estimationIt is not clear to me how the FE demeaning mechanically affects an estimation, especially with respe…
if and else in Stata versus MataDear all I am analysing the Mata code behind a command (fairlie) in order to understand what actuall…
Comparing xtreg and repeated-measures ANOVAHello, This is a partial repost of a question I asked here: https://www.statalist.org/forums/for...…
Renaming with nested loops over irregularly repeated variables in order to prepare data for RESHAPEHi everyone, Thanks for what you do, I have benefited from your discussions for a long time before …
Subscribe to:
Post Comments (Atom)
0 Response to How to find the matched observation with nearest Mahalanobis distance?
Post a Comment