compare_probability: Compare Proportion of Results in each Class

View source: R/compare-probability.R

compare_probabilityR Documentation

Compare Proportion of Results in each Class

Description

Compares proportion of results 'a' falling into the same or different class as results 'b'. Designed for comparing simulated Environmental Quality Ratios (EQR). It is a low-level function used by the higher-level rict_compare function to compare the EQRs of two paired results.

Usage

compare_probability(
  a = NULL,
  b = NULL,
  eqr_bands = c(0, 0.2, 0.4, 0.6, 0.8, 1),
  cap_eqrs = TRUE,
  labels = 5:1
)

Arguments

a

numeric list of results 'a'

b

numeric list of results 'b'

eqr_bands

Class boundaries default is eqr_bands = c(0.0, 0.2, 0.4, 0.6, 0.8, 1.0)

cap_eqrs

Optional TRUE/FALSE - by default results are capped between 0-1

labels

Optional List of labels for labelling each class

Value

returns dataframe

See Also

rict_compare

Examples

## Not run: 
test <- compare_probability(
  a = c(0.3, 0.4, 0.6),
  b = c(1, 0.9, 0.6),
  eqr_bands <- c(0, 0.47, 0.56, 0.68, 0.8, 1)
)

## End(Not run)

aquaMetrics/rict documentation built on March 1, 2025, 1:31 p.m.