map_correlation: Calculate the correlation between true and estimated...

View source: R/map_correlation.R

map_correlationR Documentation

Calculate the correlation between true and estimated populations

Description

Calculates the correlation of true and estimated populations on a regular, matching grid. It is expected that these are arrays with the first two dimensions representing space and the third represents time. The byyear argument allows for a correlation over the entire result, or separate correlations for each year.

Usage

map_correlation(true, est, byyear = FALSE, method = "pearson")

Arguments

true

Array of true biomass

est

Array of estimated biomass, with matching first and second dimensions

byyear

Calculate correlations by year?

method

Which correlation coefficient to use; passed to cor

Value

Correlation, or vector of correlations by year

Author(s)

John K Best


jkbest2/spatq documentation built on Sept. 22, 2022, 3:22 a.m.