Package 'trendchange'

Title: Innovative Trend Analysis and Time-Series Change Point Analysis
Description: Innovative Trend Analysis is a graphical method to examine the trends in time series data. Sequential Mann-Kendall test uses the intersection of prograde and retrograde series to indicate the possible change point in time series data. Distribution free cumulative sum charts indicate location and significance of the change point in time series. Zekai, S. (2011). <doi:10.1061/(ASCE)HE.1943-5584.0000556>. Grayson, R. B. et al. (1996). Hydrological Recipes: Estimation Techniques in Australian Hydrology. Cooperative Research Centre for Catchment Hydrology, Australia, p. 125. Sneyers, S. (1990). On the statistical analysis of series of observations. Technical note no 5 143, WMO No 725 415. Secretariat of the World Meteorological Organization, Geneva, 192 pp.
Authors: Sandeep Kumar Patakamuri [aut, cre] , Bappa Das [aut, ctb]
Maintainer: Sandeep Kumar Patakamuri <[email protected]>
License: GPL-3
Version: 1.2
Built: 2025-03-08 04:30:46 UTC
Source: https://github.com/patakamuri/trendchange

Help Index


Example Data Frame for Innovative Polygon Trend Analysis

Description

User is advised to prepare the data as suggested in the example to work with monthly data analysis using Innovative Polygon Trend Analysis Method.

Usage

df

Format

Data frame With Months in the first column, calculations from the first half values in the second column and calculations from the second half values in the third column.


Distribution Free CUSUM Test

Description

Distribution free CUSUM test is used to identify the change point in a series of data.

Usage

dfcusum(x,startyear)

Arguments

x

- Time series data vector

startyear

- Starting of the time series (year!)

Details

The point at which Maximum value of cumulative sum occurs, will indicate the change point in the time series. If the maximum value is equal to or greater than the critical value, it indicates significance of the change point.

Value

CUMSUM values - Cumulative sum series

Maximum CUMSUM Value - Absolute Maximum value in cumulative sum series

90 percent CI - Critical value at 90 percent Confidence Interval (1.228*sqrt(n))

95 percent CI - Critical value at 95 percent Confidence Interval (1.36*sqrt(n))

99 percent CI - Critical value at 99 percent Confidence Interval (1.63*sqrt(n))

References

Grayson, R.B., Argent, R.M., Nathan, R.J., McMahon, T.A. and Mein, R., 1996 Hydrological Recipes: Estimation Techniques in Australian Hydrology. Cooperative Research Centre for Catchment Hydrology, Australia, 125 pp.

Examples

x<-c(Nile)
dfcusum(x,1871)

Innovative Trend Analysis

Description

Innovative trend analysis method proposed by Zekai Sen (2011) is implemented in this function.

Usage

innovtrend(x,ci = 95)

Arguments

x

- Time series data vector

ci

- Confidence Interval

Details

If the data points lay on 1:1 line, there is no trend in the data. If the data points exist in the top triangle, it is indicative of positive trend. If the data lies in the bottom triangle, it indicates negative trend in the data.

Value

S - Slope of the trend ssd - Slope Standard deviation correl - Correlation D - Trend indicator CLlower90 - Lower Cofidence Limit at 90 percent CLupper90 - Uppler Cofidence Limit at 90 percent CLlower95 - Lower Cofidence Limit at 95 percent CLupper95 - Uppler Cofidence Limit at 95 percent CLlower99 - Lower Cofidence Limit at 99 percent CLupper99 - Uppler Cofidence Limit at 99 percent

References

Şen Z (2011) Innovative Trend Analysis Methodology. J Hydrol Eng 17:1042–1046. <doi: 10.1061/(ASCE)HE.1943-5584.0000556>.

Examples

x<-c(Nile)
innovtrend(x,ci= 95)

Innovative Polygon Trend Analysis

Description

Innovative Polygon Trend Analysis method proposed by Sen et al. (2019) is implemented in this function. This function is implemented to work with monthly time series. Users are advised to prepare input data frame as provided in example.

Usage

ipta(x = x, y = y, Monthly = Monthly)

Arguments

x

- First half of Time series data vector

y

- First half of Time series data vector

Monthly

- Months of Time series data vector

Value

Slope - Slope of the trend

Distance - Trend indicator

References

Sen, Z., Sisman, E., Dabanli, I., 2019. Innovative Polygon Trend Analysis (IPTA) and applications. J. Hydrol. 575, 202-210. https://doi.org/10.1016/j.jhydrol.2019.05.028

Examples

ipta(x = df$First_half, y = df$Second_half, Monthly = df$Months)

Sequential Mann-Kendall Plot

Description

The series is rearranged based on the ranks of the original series. Prograde and retrograde series plots are generated as per Sneyers (1990). The point where prograde and retrograde series intersect will approximately indicate the possible point of change.

Usage

sqmk(x,startyear)

Arguments

x

- Time series data vector

startyear

- Starting of the time series (year!)

Details

The point where prograde series and retrograde series intersect, will indicate probable change point in the series. When there is no clear trend in the data, the series will intersect at several locations.

Value

Prograde - Prograde series

Retrograde - Retrograde series

Intersection - True if intersecting and False if not intersecting.

References

Sneyers S (1990) On the statistical analysis of series of observations. Technical note no 5 143, WMO No 725 415 Secretariat of the World Meteorological Organization, Geneva, 192 pp

Examples

x<-c(Nile)
sqmk(x,1871)

Annual flow of the Nile River

Description

Nile River data available with R base is used for testing purpose

Usage

x

Format

Nile river flow measured at Aswan station during 100 year period from 1871 to 1970 is used for testing

References

R Core Team (2021). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria.

Durbin, J. and Koopman, S. J. (2001). Time Series Analysis by State Space Methods. Oxford University Press.

Balke, N. S. (1993). Detecting level shifts in time series. Journal of Business and Economic Statistics, 11, 81–92. doi: 10.2307/1391308.

Cobb, G. W. (1978). The problem of the Nile: conditional solution to a change-point problem. Biometrika 65, 243–51. doi: 10.2307/2335202.