run_robustness: Run robustness analysis pipeline

View source: R/run_robustness.R

run_robustnessR Documentation

Run robustness analysis pipeline

Description

Run robustness analysis pipeline

Usage

run_robustness(
  param_space_name,
  param_set,
  replicates,
  distance_method = "abs",
  save_output = TRUE,
  test = FALSE
)

Arguments

param_space_name

A string with the parameter space to run. See is_param_space_name() for options.

param_set

A numeric with the line corresponding to parameter set to run, as found in the file named in param_space.

replicates

A numeric for the number of replicates for the simulations

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

save_output

A boolean to determine whether to save or return output.

test

A boolean, defaults to 'FALSE'. Set to 'TRUE' for testing purposes, to fix the seed.

Value

A named list of length 20 containing errors, error metrics, simulation and MLE output:

spec_nltt_error

a numeric vector with as many elements as replicates (one element per replicate). Each value is the nltt error for species through time (deltaSTT) between a geodynamic simulation and an oceanic simulation.

num_spec_error

a numeric vector with as many elements as replicates (one element per replicate) with the difference in the number of species at the end of the simulation between a geodynamic and an oceanic simulation.

num_col_error

a numeric vector with as many elements as replicates (one element per replicate) with the difference in the number of colonists at the end of the simulation between a geodynamic and an oceanic simulation.

endemic_nltt_error

a numeric vector with as many elements as replicates (one element per replicate). Each value is the nltt error for endemics through time (deltaESTT) between a geodynamic simulation and an oceanic simulation.

nonendemic_nltt_error

a numeric vector with as many elements as replicates (one element per replicate). Each value is the nltt error for non-endemics through time (deltaNESTT) between a geodynamic simulation and an oceanic simulation.

spec_baseline_nltt_error

a numeric vector with as many elements as replicates (one element per replicate). Each value is the nltt error for species through time (deltaSTT) between the first oceanic simulation and the second oceanic simulation.

num_spec_baseline_error

a numeric vector with as many elements as replicates (one element per replicate) with the difference in the number of species at the end of the simulation between the first oceanic simulation and and the second oceanic simulation.

num_col_baseline_error

a numeric vector with as many elements as replicates (one element per replicate) with the difference in the number of colonists at the end of the simulation between the first oceanic simulation and and the second oceanic simulation.

endemic_baseline_nltt_error

a numeric vector with as many elements as replicates (one element per replicate). Each value is the nltt error for endemics through time (deltaESTT) between the first oceanic simulation and and the second oceanic simulation.

nonendemic_baseline_nltt_error

a numeric vector with as many elements as replicates (one element per replicate). Each value is the nltt error for non-endemics through time (deltaNESTT) between a the first oceanic simulation and and the second oceanic simulation.

error_metrics

a named list with 10 elements:

num_spec_mean_diff

a numeric atomic vector with the absolute difference between the mean of the $num_spec_error vector and the mean of the $num_spec_baseline_error vector.

num_spec_sd_diff

a numeric atomic vector with the absolute difference between the standard deviation of the $num_spec_error vector and the standard deviation of the $num_spec_baseline_error vector.

num_col_mean_diff

a numeric atomic vector with the absolute difference between the mean of the $num_col_error vector and the mean of the $num_col_baseline_error vector.

num_col_sd_diff

a numeric atomic vector with the absolute difference between the standard deviation of the $num_col_error vector and the standard deviation of the $num_col_baseline_error vector.

spec_nltt_mean_diff

a numeric atomic vector with the absolute difference between the mean of the $spec_nltt_error vector and the mean of the $spec_baseline_nltt_error vector.

endemic_nltt_mean_diff

a numeric atomic vector with the absolute difference between the mean of the $endemic_nltt_error vector and the mean of the $endemic_baseline_nltt_error vector.

nonendemic_nltt_mean_diff

a numeric atomic vector with the absolute difference between the mean of the $nonendemic_nltt_error vector and the standard deviation of the $nonendemic_baseline_nltt_error vector.

spec_nltt_sd_diff

a numeric atomic vector with the absolute difference between the standard deviation of the $spec_nltt_error vector and the standard deviation of the $spec_baseline_nltt_error vector.

endemic_nltt_sd_diff

a numeric atomic vector with the absolute difference between the standard deviation of the $endemic_nltt_error vector and the standard deviation of the $endemic_baseline_nltt_error vector.

nonendemic_nltt_sd_diff

a numeric atomic vector with the absolute difference between the standard deviation of the $nonendemic_nltt_error vector and the standard deviation of the $nonendemic_baseline_nltt_error vector.

passed_novel_mls

a list of up to as many elements as specified in replicates, containing the output of successful MLE runs on geodynamic simulations. Only successful MLE are stored in this list, hence the size may be lower than replicates Each list element is a data frame containing the estimated parameters, degrees of freedom and convergence flag.

failed_novel_mls

a list of up to as many elements as specified in replicates, containing the output of failed MLE runs on geodynamic simulations. Only failed MLE are stored in this list, hence the size may be (and usually is much) lower than replicates. Each list element is a data frame containing the estimated parameters, degrees of freedom and convergence flag.

passed_oceanic_mls

a list of up to as many elements as specified in replicates, containing the output of successful MLE runs on geodynamic simulations. Only successful MLE are stored in this list, hence the size may be lower than replicates. Each list element is a data frame containing the estimated parameters, degrees of freedom and convergence flag.

failed_oceanic_mls

a list of up to as many elements as specified in replicates, containing the output of failed MLE runs on geodynamic simulations. Only failed MLE are stored in this list, hence the size may be lower than replicates. Each list element is a data frame containing the estimated parameters, degrees of freedom and convergence flag.

failed_novel_sims

a list of up to as many elements as specified in replicates, each element containing the geodynamic simulation output that caused MLE runs to fail. Only simulations which result in downstream MLE failure are stored in this list, hence the size may be (and usually is much) lower than replicates.

passed_oceanic_sims_1

a list of up to as many elements as specified in replicates, each element containing the first set of oceanic simulation output that is passed to MLE and runs without issues.

passed_oceanic_sims_2

a list of up to as many elements as specified in replicates, each element containing the second set of oceanic simulation output that is passed to MLE and runs without issues.

failed_oceanic_sims

a list of up to as many elements as specified in replicates, each element containing the first set of oceanic simulation output that caused MLE runs to fail. Only simulations which result in downstream MLE failure are stored in this list, hence the size may be (and usually is much) lower than replicates.

Author(s)

Joshua W. Lambert, Pedro Santos Neves, Shu Xie


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