SPI.calc {WASP}R Documentation

Calculate Standardized Precipitation Index, SPI

Description

Calculate Standardized Precipitation Index, SPI

Usage

SPI.calc(prec.zoo, sc = 24, method = "mle")

Arguments

prec.zoo

A zoo series contain date and rainfall vector/matrix.

sc

The accumulation period in months. Commonly 6, 12, 24, 36, and 48 months.

method

A character string coding for the fitting method: "mle" for 'maximum likelihood estimation', "mme" for 'moment matching estimation', "qme" for 'quantile matching estimation' and "mge" for 'maximum goodness-of-fit estimation'.

Value

A matrix of time series.

Examples

data(rain.mon)

## compute SPI
SPI <- SPI.calc(window(rain.mon, start = c(1949, 1), end = c(2009, 12)), sc = 12)

## plot
par(mfrow = c(3, 5))
for (i in seq_len(ncol(SPI))) plot(SPI[, i])

[Package WASP version 1.4.4 Index]