Learn R Programming

ffaframework (version 0.1.1)

eda_spearman_test: Spearman Test for Autocorrelation

Description

Performs the Spearman serial correlation test on annual maximum series data to check for serial correlation at various lags. Reports the smallest lag where the serial correlation is not statistically significant at the given significance level (the least insignificant lag).

Usage

eda_spearman_test(data, alpha = 0.05)

Value

A list containing the test results, including:

  • data: The data argument.

  • alpha: The significance level as specified in the alpha argument.

  • null_hypothesis: A string describing the null hypothesis.

  • alternative_hypothesis: A string describing the alternative hypothesis.

  • rho: Numeric vector of serial correlation estimates for lags \(1\) to \(n-3\).

  • least_lag: The smallest lag at which the serial correlation is insignificant.

  • significant: Indicates whether the serial correlation is significant at each lag.

  • reject: If TRUE, the null hypothesis was rejected at significance alpha.

Arguments

data

Numeric vector of observed annual maximum series values. Must be strictly positive, finite, and not missing.

alpha

Numeric scalar in \([0.01, 0.1]\). The significance level for confidence intervals or hypothesis tests. Default is 0.05.

See Also

stats::cor.test(), eda_bbmk_test(), plot_spearman_test()

Examples

Run this code
data <- rnorm(n = 100, mean = 100, sd = 10)
eda_spearman_test(data)

Run the code above in your browser using DataLab