Calculates Constancy (C), Contingency (M), and Predictability (P) metrics from Colwell (1974) for seasonally varying environmental data.

colwell_stats(time_series, dates, n_states = 11)

Arguments

time_series

A numeric vector containing a raw environmental time series.

dates

An vector of class Date of format YYYY-MM-DD (must be in progressive chronological order).

n_states

is a numeric vector of length 1 containing a somewhat arbitrary number, as Colwell's method divides a continuous variable up into discrete states. Default (arbitrary) is 11. See Details.

Value

A data.frame.

See also

Author

Diego Barneche and Scott Burgess.

Examples

library(envPred) data(sst) data(npp) n_states <- 11 fct <- envPred:::colwell_stats fct(sst$time_series, sst$dates, n_states)
#> colwell_c colwell_m colwell_p #> 1 0.03052538 0.4583633 0.4888887
fct(npp$time_series, npp$dates, n_states)
#> colwell_c colwell_m colwell_p #> 1 0.1131317 0.3111578 0.4242895