Announcement

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

  • Time variable with gaps

    Hello,

    I am currently working on my dissertation topic. For my methodology I chose to perform Johansen cointegration test, but before I have to perform unit root test and test for structural breaks. I don't have any previous experience with Stata 16, but I managed to inset the data I have collected and convert my time variable into format readable by Stata. I have total of 70 observations. Next, I have declared qdate to be time-series data, which worked fine and showed time variable to be : 2002q4 to 2020q1. However, when declaring dataset to be panel data the command shows:

    xtset price qdate
    panel variable: price (unbalanced)
    time variable: qdate, 2002q4 to 2020q1, but with gaps
    delta: 1 quarter

    I tried to fill in the gaps in the time variable, but it completely mixes my dataset and adds quarters that are already present.

    xtset t qdate is the only one that does shows "but with gaps" message.

    To create my qdate column I used commands:
    • gen qdate= quarterly(date, "YQ")
    • format qdate %tq
    I have included my dataset and tsreport in the attachments.

    What is the reason for "but with gaps" message and what should I do next to make my data ready for the tests I have chosen.


    Many thanks,

    Anna



    Attached Files

  • #2
    Anna:
    quoting from Example #3, -xtset- entry, Stata .pdf manual, release 16:
    The note “but with gaps” above is no cause for concern. It merely warns us that, within some panels,

    some time values are missing.
    That said, it is probably better to let your data as they are.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      What makes you think that you have panel data? From what I see, you have several time series (price, building, etc.).

      Code:
      tsset qdate
      should be sufficient, followed by time-series analysis.

      Comment

      Working...
      X