Learn R Programming

MultivariateTrendAnalysis (version 0.1.3)

summaryTrend: Trend Tests Summary

Description

Performs multivariate and univariate trend tests on the given data series and returns a data frame with the results.

Usage

summaryTrend(data, width, covar = NULL)

Value

The results dataframe, a column for the respective test statistic, a column for the p-value, and four rows each for a test MDT, MOT, and MK for each variable.

Arguments

data

Numeric matrix, a two dimensional data set where each column is a variable.

width

Numeric value, the width to be used for the moving window algorithm. Should be bigger than 1 and smaller than the number of observations.

covar

Numeric vector, time order of the data series. If none give \(covar = 1, 2, ..., n\).

Details

The function performs the Multivariate Dependence Trend and Multivariate Overall Trend tests as described by Goutali and Chebana (2024), as well as the univariate Mann-Kendall (MK) test to each variable and returns a data frame with the results.

This functions performs the test with the default values for alpha = 0.05 and Nbs = 1000, for a more precise testing you can use the functions described in see also.

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")

See Also

  • MDT_test: Function used to perform the MDT test.

  • MOT_test: Function used to compute the MOT test.

  • mkUnivariate: Function used to perform the univariate MK test.

Examples

Run this code

# \donttest{
# Summary for data with trend in the Dependence Structure:
DependenceStructure <- generate_data("dependenceStructure", 50)
summaryTrend(DependenceStructure, covar = NULL, width = 10)

# Summary for data with trend in the Marginals:
MarginalTrend <- generate_data("marginalTrend", 50)
summaryTrend(MarginalTrend, covar = NULL, width = 10)

# Summary for data without trend:
NoTrend <- generate_data("noTrend", 50)
summaryTrend(NoTrend, covar = NULL, width = 10)
# }

Run the code above in your browser using DataLab