Announcement

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

  • Synth command error: "R: operator invalid"

    Hello all, I am trying to use synthetic control to identify the impact of an artist's sales strategy on the album's digital sales.
    My STATA command is as follows;

    tsset artistalbumcode release

    synth lndigital lncdsales CV1 CV2 CV3, trunit(1) trperiod(14)

    trunit = 1 is the treated unit (the artist), and trperiod is when the strategy was implemented (FYI, release variable ranges from 1 to 39.)
    When I run the above commands, then I get the following error message during "the First Step: Data Setup."

    'R: operator invalid'

    Does anyone know about this error message?

  • #2
    I had a similar error message where a label of my cross-section identifier appeared before ":operator invalid". Apparently synth does not like labeled numerical variables as ids. If "R" is among the identifiers of your obs then the problem might be similar. Try redefining your panel vars without labels.

    Comment

    Working...
    X