Announcement

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

  • time values with period less than delta() found

    Dataset -> https://pastebin.com/raw/J0Vre2Fw

    In this dataset there are a few columns which represent the AAPL stock price over time.
    The first column "statatime" is stored as a Double, it is formatted as format statatime %tcDDmonCCYY_HH:MM:SS.sss

    This is the output I get:

    Code:
    . describe statatime
    
    Variable Storage Display Value
    name type format label Variable label
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    statatime double %tc..
    
    . tsset statatime, delta(86400 second)
    
    Time variable: statatime, 13jan2020 14:30:00.000 to 03nov2022 13:30:00.000, but with gaps
    Delta: 1 day
    
    . tsreport
    
    Time variable: statatime
    ----------------------------------------
    Starting period = 13jan2020 14:30:00.000
    Ending period = 03nov2022 13:30:00.000
    Number of obs = 710
    Number of gaps = 148
    
    . tsfill
    
    . tsreport
    time values with period less than delta() found
    r(451);
    as you will see in the original dataset, there is no statatime column members that do not end with "30:00.000"
    thank you for looking

  • #2
    If your data are really daily, the time of day recorded should be trivial and so you could push the times through dofc().

    Code:
    sort statatime 
    gen diff =  statatime - statatime[_n-1] 
    spikeplot diff
    should throw light on what is going on.

    Comment


    • #3
      Oh I had not realized that the data had daylight savings

      Comment

      Working...
      X