Learn R Programming

HyMETT (version 1.1.3)

GOF_correlation_tests: Calculates Kendall's Tau, Spearman's Rho, Pearson Correlation

Description

Calculates Kendall's Tau, Spearman's Rho, Pearson Correlation, and p-values as a wrapper to the stats::cor.test function. Output is tidy-style data.frame.

Usage

GOF_correlation_tests(mod, obs, na.rm = TRUE, ...)

Value

A tibble (tibble::tibble) with test statistic values and p-values.

Arguments

mod

'numeric' vector. Modeled or simulated values. Must be same length as obs.

obs

'numeric' vector. Observed or comparison values. Must be same length as mod.

na.rm

'boolean' TRUE or FALSE. Should NA values be removed before computing. If any NA values are present in mod or obs, the ith position from each will be removed before calculating. If NA values are present and na.rm = FALSE, then function will return NA. Default is TRUE

...

Further arguments to be passed to or from stats::cor.test.

Details

See stats::cor.test for more details and further arguments to be passed to or from methods. Defaults are used.

See Also

Examples

Run this code
GOF_correlation_tests(mod = example_mod$streamflow_cfs, obs = example_obs$streamflow_cfs)

Run the code above in your browser using DataLab