computenspi | R Documentation |
Computes the stationary and non-stationary version of the Standardized Precipitation Index. The non-stationary version uses GAMLSS and models the parameters of a Gamma distribution by incorporating the trend of accumulated precipitation.
computenspi(x, stationaryspi, spiScale, dist = "gamma")
x |
data.table |
stationaryspi |
logical used in array method (TRUE when stationary and FALSE when otherwise) |
spiScale |
A positive integer value, typically ranging from 1 to 24 |
dist |
A character that can be either, "normal" when Normal distribution is used, "gamma" for Gamma, "zigamma" for zero adjusted Gamma and "weibull" for Weibull. |
data.table
computenspi(x = dummyrainfall(1950, 2000),
stationaryspi = TRUE,
spiScale = 12,
dist = 'gamma'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.