Announcement

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

  • count the number of consecutive days in Stata

    Hi all,

    I have a data set with the following information:
    - rainfall
    - longitude
    - latitude
    - date (day, month, year)

    To sum up, for a specific location (longitude and latitude combined), I have the rainfall data for every day of the year. I want to count the number of consecutive days when the rainfall variable is equal to 0. Does anyone know how to do it?

    Thanks in advance for your help!

  • #2
    Please see: https://www.stata.com/support/faqs/d...-observations/

    Comment


    • #3
      See also

      https://journals.sagepub.com/doi/pdf...867X0700700209

      Code:
      ssc install tsspell

      Comment

      Working...
      X