Calculating SPI with Lognormal Distribution in R?Drought

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!

1 Like

Hi, @med1 Welcome to Posit community.
Maybe the function fitmixture in Package ForestFit is helpful to you.
image

CRAN - Package ForestFit (r-project.org)

{drought} SDI() function will take a lognormal argument

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.