calc_error: Calculates error metrics between two simulations

View source: R/calc_error.R

calc_errorR Documentation

Calculates error metrics between two simulations

Description

Calculates error in number of species and colonists, number of species-through-time, number of endemics-through-time and non-endemics-through-time.

Usage

calc_error(sim_1, sim_2, sim_pars, distance_method)

Arguments

sim_1

A list of simulation output from DAISIE_sim_cr(), DAISIE_sim_time_dep(), DAISIE_sim_cr_shift(), or DAISIE_sim_trait_dep().

sim_2

A list of simulation output from DAISIE_sim_cr(), DAISIE_sim_time_dep() or DAISIE_sim_cr_shift(), or DAISIE_sim_trait_dep().

sim_pars

A list of simulation parameters.

distance_method

From the nLTT package. How the difference between the two nLTTs is summed:

  • "abs": the absolute distance between the two nLTTs is summed

  • "squ": the squared distance between the two nLTTs is summed

Value

A list with five error metrics:

$spec_nltt_error

Numeric vector with the nltt error between the two simulations.

$num_spec_error

Numeric vector with the difference in the number of species at the end of the simulation between the two simulations.

$num_col_error

Numeric vector with the difference in the number of colonists at the end of the simulation between the two simulations.

$endemic_nltt_error

Numeric vector with the nltt error of the endemic species between the two simulations.

$nonendemic_nltt_error

Numeric vector with the nltt error of the non-endemic species between the two simulations.

Author(s)

Joshua W. Lambert, Pedro Santos Neves, Shu Xie


Neves-P/DAISIErobustness documentation built on May 22, 2024, 4:26 p.m.