SDI | R Documentation |
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.
SDI(X, ts = 6, dist = "EmpGrin")
X |
The vector of a monthly hydro-climatic variable of n years. |
ts |
is the accumulated time scale. |
dist |
is a distribution function.The inputs can be "EmpGrin","EmpWeib","Gamma","Lognormal". |
Apart from the standardized drought index, the percentile (probability) is also provided,
The (univariate) standardized drought index of different time scales from both the empirical and parametric distribution
X=runif(120, min = 0, max = 100) # 10-year monthly data
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.