Announcement

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

  • dfuller no observation message error

    Hello, I am trying to run an ADF regression thanks to fuller but this is what it says me that there is no observation, I think it might be because of the variable DATE but I am not sure. Any clue ?
    Attached Files

  • #2
    Please read the FAQ Advice carefully to ask a better question. In common with many other members I won't open a spreadsheet to see what your dataset looks like in MS Excel. Why assume that active people here even use that program?

    https://www.statalist.org/forums/help especially #12 applies.

    It's possible that RSP is a string variable and/or that there are too many gaps in your data.

    Comment


    • #3
      It guess that the problem is the following: You are observing the data only once every three months but you have tsset your data as monthly data. With the resulting gaps, dfuller is unable to estimate a dynamic time series model. You need to use the delta() option of tsset as follows:
      Code:
      tsset date, delta(3)
      https://twitter.com/Kripfganz

      Comment


      • #4
        Hello

        i have used these commands to set my time series analysis. I have daily data observing them from Mondays to Fridays, meaning that no data on Saturdays and Sundays. Running dfuller test - returns "no observations"

        . gen date2 = daily( Date,"MDY")
        (2,462 missing values generated)

        . format date2 date2 %td

        . tset date2,delta(5)
        time variable: date2, . to .
        delta: 5 days

        . dfuller Return, trend lag(0)
        no observations
        r(2000);

        Please help me on this, attached find dataset I am using.

        with regards,

        Julian
        Attached Files

        Comment


        • #5
          The option -delta(5)- implies that successive dates are separated by 5 days. What you need is a business calendar. See an example of how to create one in

          Code:
          help bcal

          Comment


          • #6
            There is a problem at the beginning of #4 which does not go away. You specified that your daily dates were MDY but they are all YMD. In fact the generate and the tsset statements are both telling you that all your dates are missing given that incorrect specification, so the problem is not with dfuller but upstream of that.

            A better start would be

            Code:
            . gen date = daily(Date, "YMD")
            
            . format date %td
            That said, I agree with Andrew Musau that you need a business calendar.

            However, your code in #4 does not seem to be copied and pasted (tset would have triggered an error, not the output shown), but I guess that's the main difficulty.
            Last edited by Nick Cox; 01 Sep 2022, 02:12.

            Comment


            • #7
              More of a butcher's approach here, which I use in my research instead of business calendars is

              Code:
               
               gen date = daily(Date, "YMD")   format date %td 
              sort date 
              
              gen t = _n
              
              tsset t

              Comment


              • #8
                @Joro & Nick thank - you for your help. It has worked perfectly.

                Comment

                Working...
                X