SDI: Compute the standardized drought index

Description Usage Arguments Details Value Examples

Description

Based on the vector of monthly variables, the standardized drought index is computed. Note here the standardized precipitation index (SPI) is used as the example of the drought index in the univariate case. It also represents other drought indices computed in the similar way as SPI.

Usage

1
SDI(X, ts = 6, dist = "EmpGrin")

Arguments

X

The vector of a monthly hydro-climatic variable of n years.

ts

is the accumulated time scale.

dist

is distribution funciton.

Details

Apart from the standardized drought index, the percentile (probability) is also provided,

Value

The univariate and multivariate drought index of different time scale from both the empirical and gamma distribution

Examples

1
2
3
4
5
X=runif(120, min = 0, max = 100)
fit<-SDI(X,ts=3) # Compute the 3 month drought index
fit$SDI # Get the empirical drought index 
z=matrix(t(fit$SDI),ncol=1)
plot(z, type="l", col=1, lwd=2, lty=1, xlim=c(0,120),xlab="Time",ylab="SDI")

Example output

            [,1]       [,2]       [,3]       [,4]       [,5]       [,6]
 [1,]         NA         NA -1.0187948 -1.0187948 -1.0187948 -1.0187948
 [2,]  1.5430979  0.2784046 -0.6651902 -0.1241636  0.1241636  1.5951802
 [3,] -1.5430979 -1.5430979 -1.5951802 -1.5951802 -0.6651902  0.6651902
 [4,]  0.0000000  0.0000000  0.3805229  0.3805229  1.0187948  1.0187948
 [5,] -0.2784046 -0.5807581 -0.3805229 -0.6651902 -0.3805229 -0.3805229
 [6,]  0.5807581 -0.2784046  0.1241636 -0.3805229  0.3805229  0.1241636
 [7,] -0.9500138 -0.9500138 -0.1241636  0.6651902  1.5951802 -0.1241636
 [8,]  0.9500138  1.5430979  1.5951802  1.0187948  0.6651902  0.3805229
 [9,] -0.5807581  0.9500138  0.6651902  0.1241636 -1.5951802 -1.5951802
[10,]  0.2784046  0.5807581  1.0187948  1.5951802 -0.1241636 -0.6651902
            [,7]       [,8]       [,9]      [,10]      [,11]      [,12]
 [1,] -1.0187948  0.1241636  0.3805229  1.5951802  1.5951802  1.5951802
 [2,]  0.1241636 -0.6651902 -1.5951802 -1.5951802 -0.6651902 -0.6651902
 [3,] -0.1241636 -0.3805229 -0.3805229 -0.1241636  0.6651902  0.3805229
 [4,]  1.5951802  1.5951802  0.6651902  1.0187948  0.3805229  0.1241636
 [5,] -0.3805229 -0.1241636 -1.0187948 -0.6651902 -0.3805229  0.6651902
 [6,]  0.6651902 -1.0187948  0.1241636 -0.3805229  0.1241636 -1.5951802
 [7,] -0.6651902 -1.5951802 -0.6651902  0.3805229 -0.1241636  1.0187948
 [8,]  1.0187948  0.6651902 -0.1241636 -1.0187948 -1.0187948 -1.0187948
 [9,] -1.5951802  0.3805229  1.5951802  0.6651902  1.0187948 -0.1241636
[10,]  0.3805229  1.0187948  1.0187948  0.1241636 -1.5951802 -0.3805229

drought documentation built on May 2, 2019, 5:54 p.m.