I am working on calculating the Standardized Precipitation Index (SPI) using the lognormal distribution in R. However, the spei package does not seem to support this distribution. I would like to know how I can calculate SPI with the lognormal distribution in R.
I have also tried using the fitdistr function from the MASS package to estimate the parameters for the lognormal distribution, but I'm unsure about the next steps to calculate SPI based on these parameters.
Any guidance or code examples would be greatly appreciated. Thank you!