Announcement

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

  • STATA Synth - specifying 'trunit' problem

    Hi all,

    I am running a Synthetic Control using a group of 18 countries with an unbalanced data set. I am currently working through how to deal with my missing data, but have come across a problem. I have assigned unit numbers to all of my countries (1-18) and want to use 17 as my treatment unit. As an example, I use the following command.

    Code:
    Code:
    synth FTSEprice, GDPRatiototrend Importvalue Exportvalue Inflationrate CLI Shareprices monthinterbankrate Overnightinterbankrate, trunit(17) trperiod(20454) nested fig
    However, when running this command it states an 'invalid 'trunit''. I am not quite understanding why it is not recognising my country unit indicators, and am concerned as to whether it may have something to do with my unbalanced dataset.

    This what STATA says when trting to run the command.
    Code:
    Code:
    synth FTSEprice, GDPRatiototrend Importvalue Exportvalue Inflationrate CLI Shareprices monthinterbankrate Overnightinterbankrate, trunit(17) trperiod(20454) nested fig
    invalid 'trunit'
    r(198);
    Would anyone be able to help me figure out why it is not recognising my unit variables? This is my first time using Statalist so please do let me know if I need to expand or post anymore information to help solve the issue.

    Many thanks
    Last edited by Indy Lall; 03 May 2020, 15:03.

  • #2
    Welcome to Statalist.

    While I don't use the synth command myself, looking at the output of help synth tells me that there should be no comma following your dependent variable FTSEprice in the command, the only comma separates the last variable from the first option. The error message suggests that Stata was confused by the second comma.
    Last edited by William Lisowski; 03 May 2020, 17:47.

    Comment

    Working...
    X