Announcement

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

  • Conformability error - Synthetic Controls

    Hello,

    I have been trying to code a synthetic controls estimation, but I keep getting the following error:

    conformability error
    r(503);

    I would very much appreciate if someone could help me out with this. My database is a balanced panel with 190 countries and 24 years (1990-2013). There are only three missing values.

    As for the code, it is the following

    Code:
    encode countryorarea, generate(panelvar)
    xtset panelvar year
    
    **Iraq
    synth gni_pc share_ag share_const share_man share_min share_others share_transp share_wholesale gcf_pbi dens_pob
    Thank you very much in advance!

    César Urquizo

  • #2
    Cesar,

    You have posted this at least 13 times in the space of a few hours today. While I'm sure part of this is due to getting a prolonged "Working" message when you attempt to post and re-posting thinking you haven't gotten through, the longer intervals between some of your posts leads me to think that you actually know that your posts are getting through.

    When a post doesn't draw answers, there's usually a reason, and repeating the same post will not help you. If anything, some people are turned off by the apparent impatience.

    In the case of this post, I think the problem is that you are asking a question about -synth-, which is not an official Stata command. I suppose it is a user-written command. So you need to give some information about what it is and where you got it from. Since I've "been around the block a few times" with Stata and have never heard of this one, my guess is that relatively few people on the forum have either.

    Comment


    • #3
      If this is the synth package from SSC (authors Abadie, A., Diamond, A., and J. Hainmueller), note that help synth states that the trunit(#) and trperiod(#) options are required, and they are included in all the provided examples. The code quoted above lacks these options.

      In general "conformability error" in Stata indicates that two matrices are being operated on (e.g., added, multiplied) and the shapes of the two matrices do not meet the requirements of the operation. For example, A + B where A has 3 rows and 6 columns and B has 3 rows and 7 columns.

      Comment


      • #4
        On thinking about this overnight, I have some further thoughts, again predicated on the assumption that I've correctly identified the synth to which César refers.

        Getting a conformability error suggests to me that his data has caused synth to travel down some previously unexplored paths in the program. Perhaps the solution is as easy as providing the options I mentioned above. Or perhaps the pattern of missing values has caused the conformability problem - I mention this only because Google searches turn that up as a problem in other applications in Stata. So if setting the options properly doesn't clear the problem, then it might be worth creating a copy of the data that omits the countries that have the three missing values, and seeing if the problem occurs on that dataset.

        Comment

        Working...
        X