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?
How to create a loop to select 2 variables from a list?Hello! I would like to create a loop that allows me to select all the possible combinations of 2 va…
How to get coefficients for other covariates in a propensity score weighting model?How to show coefficients for other covariates in a propensity score weighting model (IPW)? The PHP…
Different time series within the same variable.I have been having an issue graphing one of my variables in a time series database. My data set cont…
How to do Summations?Hello, I'm very new to stata and am having trouble figuring this out. If have have 2 variable lists,…
Copying Variable Names That Are Missing within a RangeHi, all. I have dataset where country names (variable: Country) are missing rather randomly. I have…
Subscribe to:
Post Comments (Atom)
0 Response to How to find the matched observation with nearest Mahalanobis distance?
Post a Comment