Description Usage Arguments Details References Examples
View source: R/calc_indices_get_arguments.R
arguments for index spi
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## S3 method for class 'spi'
index_arguments(
climindvis,
timescale = 6,
ref = NULL,
distribution = "gamma",
limit = Inf,
trend = FALSE,
NAmaxAgg = 20,
forecast = FALSE,
NAmaxTrend = 20,
...
)
|
climindvis |
Object of type climindvis as returned by |
timescale |
Integer. Timescale for monthly SPI calculation. The timescale is the window length (in month) of a backward looking running mean. Default = 6. |
ref |
Vector with start and end year for reference period. If no reference period is specified, the full period is used as reference period. |
distribution |
A character string naming a distribution of package stats (see for example GammaDist). For more information on the choice of the distribution, see section Details. Default = "gamma". |
limit |
Truncate SPI values that are larger than a given threshold, as values larger than 4 are not reasonable. Default = 4. The truncation can be disabled by setting limit = Inf. |
trend |
Logial (or character). Calculates trends with a predefined method for the chosen index. For information on default method, see |
NAmaxAgg |
Maximum number of missing values in daily data of each aggregation period (e.g. in all January values for the whole time series). Value between 0 (=0%; no missing values allowed) and 100 (=100%; all values can be missing values). If the number of missing values is higher than NAmaxAgg the index value for the respective grid point/station is set to NA. Default = 20 (20%). |
NAmaxTrend |
Maximum number of years in time series of index which are missing values. Value between 0 (=0%); no years with missing values allowed) and 100 (=100%); all years can be missing values). If exceeded, the trend is set to NA for the respective grid point/station. Note that the value is relative to the length of the time series. Default = 20 (20%). |
The SPI calculation is based on the SCI package from Lukas Gudmundsson & James Stagge. For the SPI calculation, aggt needs to be set to "monthly". For the argument distribution, provide a distribution for which the corresponding density function (dname), the corresponding distribution function (pname) and the quantile function (qname) are defined (see for example GammaDist). Distributions are listed in the package stats.
Note, that it is important, what distribution you choose for the transformation of your rainfall data. If you are not sure, consider the references below.
Stagee, J.H. ; Tallaksen, L.M.; Gudmundsson, L.; van Loon, A.; Stahl, K.: Candidate Distributions for Climatological Drought Indices (SPI and SPEI), 2015, International Journal of Climatology, 35, 4027-4040, doi:10.1002/joc.4267.
1 2 | data(object_st) # load example objects
calc_index(object_st,index="spi",aggt="monthly")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.