Learn R Programming

ffaframework (version 0.1.1)

plot_mks_test: Plot Mann–Kendall–Sneyers (MKS) Test Results

Description

Constructs a two‐panel visualization of the MKS test. The upper panel plots the normalized progressive and regressive Mann–Kendall S‐statistics over time, with dashed confidence bounds and potential trend‐change points. The lower panel contains the annual maximum series data with the change points highlighted.

Usage

plot_mks_test(results, show_line = TRUE, ...)

Value

A 'patchwork' object with two 'ggplot2' panels stacked vertically.

Arguments

results

A list generated by eda_mks_test().

show_line

If TRUE (default), draw a fitted line through the data.

...

Optional named arguments: 'title', 'top_xlabel', 'top_ylabel', 'bottom_xlabel' and 'bottom_ylabel'.

See Also

eda_mks_test()

Examples

Run this code
data <- rnorm(n = 100, mean = 100, sd = 10)
years <- seq(from = 1901, to = 2000)
results <- eda_mks_test(data, years)
plot_mks_test(results)

Run the code above in your browser using DataLab