Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error with MAHAPICK: "matrix has missing values"

    Hello!

    I have been trying to use the MAHAPICK function to match one control observation with each treated observation using Mahalanobis distance. Currently, I am trying to match based on more than 50 different variables, each representing the percentage of observations within one US state/territory. Thus, most of the observations are 0 by design, but I think this captures the difference in operating areas very well. However, when I try to run MAHAPICK on these variables, it gives me the error of "matrix has missing values." When I do it on one or two state variables, it seems to work well, but any more than that gives the error. If I understand the function correctly, it calculates the distance between variables and synthesizes them to find the "closest" control observation to each treated observation. I do not see what the problem is, as the distance should always be calculable even if both observations are 0. I also checked all of my variables, and none of them have any missing observations. The dataset is quite clean. If anyone has experience with this function, I would appreciate any help I can get! Thank you in advance!

    Best regards,
    Samuel

  • #2
    Hi again,

    I was wondering if anyone had a solution for my previous post above! Thank you so much!

    Best,
    Samuel

    Comment


    • #3
      Hi there,

      My problem was that some variables were too highly correlated with the treatment variable, leaving insufficient variation. Mahapick doesn't seem to be able to omit these variables as other STATA functions can do, so you must find and remove them yourself.

      Best,
      Andrew

      Comment

      Working...
      X