#' X=runif(120, min = 0, max = 100) # 10-year monthly data
#' Yc<-ACCU(X,ts=6) # Compute the 6 month accumulated series
#' fit1<-SDI(X,ts=6) # Get the standardized drought index (or SPI)
#' z=matrix(t(fit1$SDI),ncol=1)
#' Res <- RunDS(z, -1)# Get drought duration and severity based on threshold SPI=-1
#' Y=runif(120, min = 0, max = 100) # 10-year monthly data
#' fit2<-MSDI(X,Y,ts=6) # Compute the 6 month Multivariate Standardized Drought Index (MSDI)
#' fit2$MSDI #Get the empirical MSDI
#' PropagationMCC(X, Y, 12, c(-1,1)) # Plot drought propagation
Run the code above in your browser using DataLab