Last data update: 2014.03.03

R: Calculation of standardized precipitation index from alpha...
Drought Index from ParametersR Documentation

Calculation of standardized precipitation index from alpha and beta parameter of the Gamma function.

Description

calculate the standardized precipitation index, from alpha and beta parameter of the Gamma function.

Usage

SPIFromParameters(Pmon, scale =3, Param_Alpha, Param_Beta)

Arguments

Pmon

monthly precipitation series ordered according to time. It is a data frame with columns: year, month, station 1, station 2, etc.

scale

an integer value representing the time scale of analysis. The most common are 1, 3, 6, 9, 12, 48, etc.

Param_Alpha

data frame monthly data values corresponding to the alpha parameter to the function Gamma.

Param_Beta

data frame monthly data values corresponding to the alpha parameter to the function Gamma.

Details

Analysis stations are in the columns of dataframe. the apha and beta parameters, are monthly and are in the rows of dataframe.

Input data

similar to Pm_Pisco.

Mon st_1 st_1 st_2 st_3
Jan 9.584860915 9.227918987 10.35269003 8.433823824
Feb 13.76378505 15.02620223 12.1021093 10.85133914
Mar 26.09112343 17.41749632 21.10924889 23.53649421
Apr 17.34996675 17.4451073 13.00894394 16.66595319
May 9.943259493 9.46815537 9.164645239 9.455850664
Jun 5.103175852 5.041710686 4.080851346 5.790986084
Jul 2.85804336 3.042484994 2.797962575 2.645188236
Aug 3.033862506 3.183267843 3.435303986 2.631287947
Sep 3.815308513 2.627317533 3.550365645 3.66482456
Oct 7.430925356 3.956716609 7.023105167 7.540706878
Nov 6.303310502 5.339943557 6.358902249 5.556660824
Dec 5.84110559 5.899534971 6.581657735 4.889599504

Value

return values of standardized precipitation index in .txt formats.

Author(s)

Iv<c3><83><c2><a1>n Arturo Ayala Bizarro <ivan.ayala@unh.edu.pe>

Jessica Z<c3><83><c2><ba><c3><83><c2><b1>iga Mendoza <zumeje@gmail.com>

References

McKee, Thomas B. and Doesken, Nolan J. and Kleist, John. 1993. The relationship of Drought Frecuency and Duration to Time Scales. Eighth Conference on Applied Climatology

A. Belauneh and J. Adamowski. Standard Precipitation Index Drought Forecasting Using Neural Networks, Wavelet Neural Networks, and Support Vector Regression. Applied Computational Intelligence and Soft Computing, http://dx.doi.org/10.1155/2012/794061

Examples

#### Load data
data(Pm_Pisco)
data(alphaGA_SPI3)
data(betaGA_SPI3)

#### Computing SPI with Genetic Algorithms
Pmon<-Pm_Pisco
Param_Alpha <- alphaGA_SPI3
Param_Beta <- betaGA_SPI3
SPIFromParameters(Pmon, scale =3, Param_Alpha, Param_Beta)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(SPIGA)
Loading required package: GA
Loading required package: foreach
Loading required package: iterators
Package 'GA' version 3.0.2
Type 'citation("GA")' for citing this R package in publications.
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/SPIGA/SPIFromParameters.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Drought Index from Parameters
> ### Title: Calculation of standardized precipitation index from alpha and
> ###   beta parameter of the Gamma function.
> ### Aliases: SPIFromParameters
> 
> ### ** Examples
> 
> #### Load data
> data(Pm_Pisco)
> data(alphaGA_SPI3)
> data(betaGA_SPI3)
> 
> #### Computing SPI with Genetic Algorithms
> Pmon<-Pm_Pisco
> Param_Alpha <- alphaGA_SPI3
> Param_Beta <- betaGA_SPI3
> SPIFromParameters(Pmon, scale =3, Param_Alpha, Param_Beta)
********** Calculation Station Pm_St1 
********** Calculation Station Pm_St2 
********** Calculation Station Pm_St3 
********** Calculation Station Pm_St4 

SPIFromParameters: Successful Analysis
See the results:  /home/ddbj/DataUpdator-rgm3/target 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>