Announcement

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

  • Error code r(2000)

    Hi,

    We are working on our thesis in which we are aiming to compare 4 different portfolios. We are quite new on STATA and are trying to get a hang of it.
    We are currently trying to compute a Garch model, but we keep receiving the same error code "no observations r(2000)".
    The thing we don't understand is that every variable is the same type - double. Which we thought were the problem at first.
    We are working with one portfolio in this data set, with 25 stocks between the time frame 2012-2022. However, a few of the stocks have missing numbers for some of the years, could that be the cause? And does anyone know how to resolve this issue?
    Thank you so much in advance!

  • #2
    The problem could indeed be missing values. r(2000) means no observations to do what you want to do here.

    To get more detailed advice, you need to show the code you tried and some example data.

    Comment


    • #3
      Thanks for your response Nick.
      We named the variables as the following (the ticker for the stock);

      CCOR, ATIC, TOBII, HEM, BIOG, PENG, ENRO, GG, CTEK, B3, MCAP, ACAST, ABSO, TRUE, PREV, DEDI, LMKG, ENGCON, MMGR, PRIC, BONG, FMM, BRG, DURC, KABE

      And used the following formula; arch date CCOR ATIC TOBII HEM BIOG PENG ENRO GG CTEK B3 MCAP ACAST ABSO TRUE PREV DEDI LMKG ENGCON MMGR PRIC BONG FMM BRG DURC KABE, arch(1) garch(1)
      We then receive the error "no observations" and "r(2000);

      The data set looks like this in excel, which we import to STATA

      Last edited by Evelina Dahlsjo; 11 Apr 2023, 02:04.

      Comment


      • #4
        Thanks for the further detail, but various problems now are identifiable.

        1. You've shown us a screenshot of a spreadsheet worksheet, which is of limited use to us unfortunately. All posters are asked to read the FAQ Advice before posting. In particular https://www.statalist.org/forums/help#stata explains how to give data examples. Excel images are specifically advised against.

        2. You are calling up arch with date as dependent variable. I am not a time series expert, but I can't see any point in that at all.

        3. You are calling up arch with a large number of predictors. Leaving aside questions of over-fitting, missing values in observations for any of those predictors, or in previous observations such as are needed to fit the model, will pare down the observations that can be used.

        Comment

        Working...
        X