Announcement

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

  • SYNTH : errorcode says missing value for all periods error, although variable is not missing for all period

    Hey Statalist!

    I am trying to construct a synthetic Great Britain to investigate impact of EU on their trade.

    My code looks like this:
    Code:
    synth eksport GDP_percapita landarea life_expec pop_growth inflation CAB invest_GDP industry_GDP, trunit(29) trperiod(1973)
    where eksport is danish for export (my dependent trade variable) and GDP pr. capita landarea life_exec pop_growth inflation CAB invest_GDP and industry_GDP is my control variables.

    I have data fra 1969 to 2015 for 29 countries to construct a synthetic UK. But when i run my code i get the following error:

    Code:
    ----------------------------------------------------------------------------------------------------------------
    Synthetic Control Method for Comparative Case Studies
    ----------------------------------------------------------------------------------------------------------------
    
    First Step: Data Setup
    ----------------------------------------------------------------------------------------------------------------
    control units: for 7 of out 29 units missing obs for predictor GDP_percapita in period 1969 -ignored for averaging
    control units: for 7 of out 29 units missing obs for predictor GDP_percapita in period 1970 -ignored for averaging
    control units: for 7 of out 29 units missing obs for predictor GDP_percapita in period 1971 -ignored for averaging
    control units: for 7 of out 29 units missing obs for predictor GDP_percapita in period 1972 -ignored for averaging
    control units: for at least one unit predictor GDP_percapita is missing for ALL periods specified
    I though it meant that i had a country where GDP_per capita was missing for all years, but i ran a tab if missing and countries have at most 22 missing values, but i have 49 years..

    Do anyone know what it could mean and would be able to help me?

    Thanks in advance
    Julia

  • #2
    I think it is telling you that you have at least one unit (actually, you have 7) for which GDP_percapita is missing for all of the periods over which the predictors are to be averaged, which in this case is by default the entire pre-intervention period 1969-1972.

    Comment


    • #3
      It makes sense! And it solved my problem! Thank you very much for fast and useful help!!

      Comment


      • #4
        what code did you run to solve this?

        Comment

        Working...
        X