Announcement

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

  • ITSA error message in time series: _t already defined

    Hi all, maybe it,S a little silly question, but i’m new in Time Series and Stata. I used a dataset for panel data and I want to confirm results by interrupted time series using the same data set. Basically I count on 26 states, 12 periods (2004 to 2015), and a balanced set, counting a total of 312 observations. The variable I used is the infant mortality rate (IMR) of all states with treatment period starting in 2010. I used the single unit model and as I mentioned trying to evaluate the possibility of any change in IMR trende after treatment. I used these codes do set data to time series, which worked fine in my first try. I wrote codes to set data and run itsa for a specific state (id = 20) as follows;

    Code do set data: . tsset id t (id = state code, 1...26 and t = years, 2004...2015)

    Code to run itsa: . itsa imr, single treatid(20) trperiod(2010) lag(1) posttrend figure

    As I said, it came up with results which unfortunately I cleared before saving, and now when I try to run the same code I receive the error message “_t already defined”.
    I do not understand why these codes worke properly and now, even if I start all over, it shows this message over and over.
    Someone may halp me to fix this.

    Thank you all.

  • #2
    Code:
    itsa imr, single treatid(20) trperiod(2010) lag(1) posttrend figure replace
    See
    Code:
    help itsa
    replace replaces variables created by itsa if they already exist. If prefix() is specified, only variables created by itsa with the same prefix will be replaced.

    Comment


    • #3
      Hi Brian,

      thank you for your promptly reply. It works now. I am used to panel data commends, which there is no need to replace variables.

      Comment

      Working...
      X