sbegueria/SPEI

computing SPEI with daily vs. monthly data

Opened this issue · 3 comments

Hi,

I am investigating the effects of drought on bird productivity using the SPEI, but I am not sure what is the best way to compute it.

I have daily data for precipitation and potential evapotranspiration, so I first computed daily SPEI values using:
meteo_ts <- ts(as.matrix(meteo_t[,-1]), start = c(1990, 1), frequency = 365)
spei_ts <- spei(meteo_ts, 1)

Now, I want to have SPEI values for longer periods (e.g. over spring) and I am a bit confused about the difference between:

  1. averaging the daily SPEI values I had over spring
  2. computing the SPEI using monthly mean precipitation and potential evapotranspiration:
    meteo_ts <- ts(meteo_t_mean[,3], start = c(1990, 1), frequency = 12)
    spei_ts <- spei(meteo_ts, 3)
  3. computing the SPEI using daily data but over the 3-month spring period:
    meteo_ts <- ts(as.matrix(meteo_t[,-1]), start = c(1990, 1), frequency = 365)
    spei_ts <- spei(meteo_ts, 91)

I tried the different methods and my models don't give the same results depending on the method used to compute the SPEI.

Are these 3 methods correct ?
Which one should I use to compute the SPEI over spring ?

I did some explorations to see if the methods gave similar values.
Here are the relationships I got for a time scale of 1 month:

mean_daily_30_days
monthly_30days

I computed the SPEI at different time scales by averaging daily SPEI values and computing the SPEI with daily data over n days (methods 1 and 3 of the previous message, corresponding to the 1st graph).
Here is the plot of the evolution of Spearman's correlation coefficient for the different time scales:

Capture

I don't understand where the cyclic pattern and the few high correlation at 12, 19, 38, 53 and 57 days.

I hope you can help me with this issue.

Thank you,
Nathalie

@Nadenot I am not sure I can give you an answer, but I really like that question. In a few weeks I am involved in teaching a course, called problem solving in statistics and data science". This would be a nice puzzled to pose to the students.

Are you able to share your data, either here, when it would become open, or to us separately, with permission to be ab le to use it on our course? (I have been really pleased that "open" is applying more often also to data as well as to software!)

@rdstern Thank you for the answer!
Here's a link to the dataset I used to compute SPEI:
https://drive.google.com/file/d/1H05fSeMf1Nq9nxmvteOVpZbQETSId_Sg/view?usp=sharing

I am looking forward to see what you come up with during your course (if it is not too late)