Package 'MCTrend'

Title: Monte Carlo Trend Analysis
Description: Application of a test to rule out that trends detected in hydrological time series are explained exclusively by the randomness of the climate. Based on: Ricchetti, (2018) <https://repositorio.uchile.cl/handle/2250/168487>.
Authors: Alonso Arriagada [aut, cre]
Maintainer: Alonso Arriagada <[email protected]>
License: GPL-3
Version: 1.0.1
Built: 2025-02-16 05:02:07 UTC
Source: https://github.com/alobondo/mctrend

Help Index


example

Description

A data frame with annual max daily rainfall series

Usage

example

Format

A object with 30 rows and 34 variable:

example

annual max daily rainfall in mm


Monte Carlo Trend Analysis

Description

This function performs Monte Carlo trend analysis on input data and generates plots.

Usage

MCTrend(x, n_rep, plot_title, int = 0.25, opt)

Arguments

x

A data frame containing the input data. The first raw expected to contain model names or time series names.

n_rep

Number of replications for the Monte Carlo simulation.

plot_title

Title for the plot.

int

A number indicating lower threshold value of the interval within which no trend is defined, the upper value is calculated based on this value, by default a lower value of 0.25 is considered.

opt

A number indicating type of results, for opt = 1 returns test result, opt = 2 returns plot

Value

A data frame and a plot containing results of the trend analysis.

Examples

# file for example
  file <- MCTrend::example

  # Apply the test
  MCTrend::MCTrend(x = file, n_rep = 100, plot_title = 'Precipitaciones', int = 0.1, opt = 1)

  # plot of the result of the test
  MCTrend::MCTrend(x = file, n_rep = 100, plot_title = 'Precipitaciones', int = 0.1, opt = 2)