<div dir="ltr">Dear NCL users,<div><br></div><div>I&#39;m twisting the SPI formula since the build in function dim_spi_n() does not meet my needs. I meet a problem of gamma fit and cumulative probability.</div><div><br></div><div>The cumulative probability of gamma distribution that I calculated (cdfgam_p) based on the output of gamma fit (dim_gamfit_n) does not make sense. I suspect that the online documentations of these two functions are not consistent, and the &quot;shape&quot; parameter in one function probably means &quot;1/shape&quot; in another function. Has anybody run into the same problem?</div><div><br></div><div>Also, does anyone know where is the source code of dim_spi_n? My calculation of SPI does not match the output of dim_spi_n exactly, although the distribution seems reasonable.</div><div><br></div><div>Thank you,</div><div>Xin</div></div>