Announcement

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

  • repeated time values within panel

    Dear statalisters, I am asking you for help because when I run
    Code:
    xtset firm year
    I receive a message saying "repeated time values within panel".
    What thats mean? I have two variables related with dates, one if the year of the observation and the other is a date of companies incorporation. I changed the formating of the date of incorporation in order that is a number of days but still have the problem.
    Thank you for your help.

    Best regards,

    Alejandro


  • #2
    Alejandro:
    the message means exactly what it tells you: you have 2 or more observations belonging to the same panel which were measured repeatedly during the same year.
    I would first try to shed light on that issue via -isid-.
    If you do not have duplicates (ie, mistakenly repeated data entry for the same observations during the same year) but what you experienced is simple a feature of your dataset, and assuming that you're not interested in using time-series commands asuch as lags and leads, you can -xtset- your data with -paneid- only:
    Code:
    xtset firm
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Dear Lazzaro, thank you for your clear answer. I am going to check if there are any duplicates.
      One more question please, may I use xtreg or xtlogit only after
      Code:
      xtset firm
      ?
      thank you very much again.
      Alejandro

      Comment


      • #4
        Alejandro:
        yes.
        Data -xtset-ing is mandatory before running any panel data regression in Stata.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          To add to Carlo's suggestions, you might look at the duplicates command as well. Sometimes, missing values for dates can generate this problem.

          Comment

          Working...
          X