SPI is the standardised deviation from the long term mean. if you have rainfall zero, you will get negative SPI (i.e. lower than the climatological mean).
This is not an answer. I also expect to have answer from Kenneth. I need a complete solution of getting SPI for 3 month (e.g., SPI at Feb) for data like Tith Nhim. Thank you.
Since the gamma function is undefined for x=0 and a precipitation distribution may contain zeros, the CDF becomes:
H(x)=q+(1-q)G(x) where q is the probability of zero. Then The H(x) is transformed to the standard normal random variable Z with mean = 0 and variance = 1. This Z value is in fact SPI.
I recommend the paper of Naresh Kumar et al - 2009 - "On the use of Standardized Precipitation Index (SPI) for drought intensity assessment".
I put the Table data suggested by Dr Costinel in the paper "On the use of Standardized Precipitation Index (SPI) for drought intensity assessment"
I have found slight differences in the calculation of different parameters for example I found for the mean 61.974 instead of 61.981 (in the paper) and all the other parameters are slightly different for example U = 0.2848 instead of 0.2846, scale 32.4618 instead 32.4544 in the paper, finally mean SPI 0.0117 instead of -0.0111. Could someone verify the calculation of this paper, maybe I'm wrong!!!
hello there, how do you find q in the kumar's paper, where they say: H(x)=q+(1-q)G(x) where q is the probability of zero ? i.e. i need to find the q, how do i find it?
Sorry Please find the attach of your excel sheet. i added another tab so you look at it and see if it does make sense. if none, you can always find me on [email protected] will talk about it
R programming is the best way to calculate SPI for the desired period. Please don't use Excel for such a work. You can solve your problem using SPI package in R:
You can also use an empirical probability function, instead of a theoretical distribution like Gamma, Pearson, etc.; this way you don't have to deal with zero precipitation problems.
It is easy to calculate by using the attached software. You need to create a file as same as the attached sample file using Microsoft Excel and NotePad.