1
$\begingroup$

My dataframe looks like this:

Julian day     Year
 153           1951
 161           1952
 167           1953
  .             .
  .             .
 161            2007

I have Julian day for each year when an event occurs and I am trying to determine whether the Julian day of that event happening is changing with time or not. Do I treat Julian day as continuous or count data. I guess if I treat it as continuous data, I will do a linear regression of Julian day against time and if it's a count data, I will do a Poisson regression against time.

$\endgroup$
8
  • 2
    $\begingroup$ Is there a first date when this event could have occurred? It sounds like your response variable is a duration, in which case you want to use a survival analysis, not a count model. $\endgroup$ Commented Jun 15, 2014 at 21:02
  • 4
    $\begingroup$ Strictly speaking, it's discrete but not actually a count (well, it's arguably a count of days since an origin, but not in the sense that would lead to a distribution like a Poisson or a binomial or a negative binomial or a hypergeometric, etc - it's not a count variable in the usual sense). I'd suggest you treat it as continuous-time, because it's a measure of 'how long' since the start of the year something happens and the discreteness from only measuring it to the day should not matter for that. $\endgroup$
    – Glen_b
    Commented Jun 15, 2014 at 21:33
  • 1
    $\begingroup$ The day of monsoon onset is a duration since the beginning of the year. It isn't a count in any meaningful sense. In addition, the beginning of the year is arbitrary. In truth, any number of days could be used to start the clock so long as it is consistent across the years, but I would try to ground it in something outside of the calendar. Perhaps the number of days since the solstice might work (I'll admit I know little of this topic). $\endgroup$ Commented Jun 15, 2014 at 22:30
  • 1
    $\begingroup$ Another issue is that there will be autocorrelations in this series. You will need to account for those somehow. A straight regression (suvival, Poison, OLS, etc) will be inappropriate. $\endgroup$ Commented Jun 15, 2014 at 22:32
  • 2
    $\begingroup$ A bit late to the party but this isn't Julian day! At least it is isn't compared with simple.wikipedia.org/wiki/Julian_day I think you're talking about day of the year in which 1 January = 1 and 31 December = 365 or 366. Either way, as @Glen_b-ReinstateMonica explains, it's discrete in principle but with many possible values it is approximately continuous. Note that if the event moved back and forth between say December or January you need to start counting at a different time of year. $\endgroup$
    – Nick Cox
    Commented Dec 11, 2019 at 17:56

1 Answer 1

1
$\begingroup$

It is count data

The day of the year is a discrete variable with a categorical distribution.

In your case you could also consider it as count data because it describes the number of days that you count untill something (the monsoon) happens. That is different than the case where the day number has no ordered meaning. E.g. 'the day when somebody is born' does not relate to something like waiting time.

Count data, what does it help you?

I imagine that waiting time for monsoon does not allow you to use typical distributions for count data like Poisson or negative binomial. That is more the case when the counts are a sum of simple individual events where each individual has a simple distribution.

E.g. when each day you have an independent probability for monsoon onset, as if the onset is determined by rolling a dice. But that doesn't seem realistic to me.

Possibly there are models that do treat it in some way like that but more advanced (I guess the problem is uncertainty about the model and it is questionable whether this is gonna help you). For instance each day adds a random amount of change until some random trigger point is being reached (e.g. the distribution of waiting time for a sum of exponential distributed variables to surpass some level/value is related to a Poisson distribution).

Treat the sampled statistic as continuous

Anyway, you can treat it as a continuous variable. The underlying categorical distribution can be likely parameterized by a few variables (rather than many variables giving the frequency/probability for each 365 days), and something like the mean of the distribution might be a meaningfull variable, which could be estimated by the sample mean (and the sample mean is a discrete variable with such small steps that you could analyze it as a continuous variable, ie. neglect errors due to discontinuity)

Plotting a histogram of your data might help you to consider what type of analysis would be best. (possibly the mean is not so interesting but instead it is an increase in the variance or some other aspect)


Count data is a bit ambiguous and you can look at it in different ways.

  • Counts can relate to aggregate data. E.g. when $X_i$ is a categorical distributed variable, where $i$ refers to various instances of that variable, then you can tabulate the several $X_i$ by counting how often a particular value occurs.
  • Counts can also relate to an individual sampled value, where the value itself is a count, e.g. counting the number of days until something (the monsoon) happens.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.