Learn R Programming

MultivariateTrendAnalysis (version 0.1.3)

generate_data: Generate Synthetic data

Description

Synthetic data generated using copulas and marginal distributions, with the purpose of exampling the functions of the package. Three options are given: "noTrend", "marginalTrend", and "dependenceStructure".

The generated "noTrend" data follows a Clayton copula with fixed Kendall Tau (\(\tau=0.2\)). "marginalTrend", follows the same copula, however the variables follow a Generalized Extreme Value distribution with fixed scale and shape parameters (\(\sigma=1, \xi=-0.1\)), the location is linearly non-stationary with \(\mu_X = 0.05\cdot t\) and \(\mu_Y = 0.07\cdot t\). Finally "dependenceStructure" presents trend in the dependence structure, the data was generated from a Clayton copula with a linear non-stationary \(\tau\) parameter. For more information we refer the reader to the source material by Goutali and Chebana (2024).

Usage

generate_data(
  trend = c("noTrend", "marginalTrend", "dependenceStructure"),
  n = 100
)

Value

A dataset of dimensions \(n \times 2\) with the generated data.

Arguments

trend

Character vector, the trend of the generated data. Options are "noTrend", "marginalTrend", and "dependenceStructure".

n

Integer, the number of data points to be generated. Must be between 10 and 200, default is 100.

References

Goutali, D., and Chebana, F. (2024). Multivariate overall and dependence trend tests, applied to hydrology, Environmental Modelling & Software, 179, tools:::Rd_expr_doi("10.1016/j.envsoft.2024.106090")

Examples

Run this code
# NO TREND
generate_data("noTrend", n = 50)

# TREND IN BOTH MARGINALS
generate_data("marginalTrend", n = 50)

# TREND IN DEPENDENCE STRUCTURE
generate_data("dependenceStructure", n = 50)

Run the code above in your browser using DataLab