Learn R Programming

fb4package (version 2.0.0)

get_efficiency_uncertainty: Get efficiency results with uncertainty

Description

Extracts growth efficiency results from FB4 simulations with uncertainty propagation when available.

Usage

get_efficiency_uncertainty(
  result,
  individual_id = NULL,
  confidence_level = 0.95
)

Value

A named list with six elements:

gross_growth_efficiency

Named sub-list with estimate, se, ci_lower, and ci_upper for the gross growth efficiency (dimensionless ratio of growth energy to consumption energy); values are NA when unavailable.

metabolic_scope

Named sub-list with the same four slots for the metabolic scope (ratio of active to standard metabolism); values are NA when unavailable.

method

Character. Fitting method used.

backend

Character. Computational backend.

has_uncertainty

Logical. TRUE when SEs and CIs are populated.

individual_id

As supplied.

Arguments

result

FB4 result object

individual_id

Individual ID for hierarchical models (NULL for population mean)

confidence_level

Confidence level for intervals (default 0.95)

Examples

Run this code
# \donttest{
data(fish4_parameters)
sp   <- fish4_parameters[["Oncorhynchus tshawytscha"]]$life_stages$adult
info <- fish4_parameters[["Oncorhynchus tshawytscha"]]$species_info
bio  <- Bioenergetic(
  species_params     = sp,
  species_info       = info,
  environmental_data = list(
    temperature = data.frame(Day = 1:30, Temperature = rep(12, 30))
  ),
  diet_data = list(
    proportions = data.frame(Day = 1:30, Prey1 = 1.0),
    energies    = data.frame(Day = 1:30, Prey1 = 5000),
    prey_names  = "Prey1"
  ),
  simulation_settings = list(initial_weight = 100, duration = 30)
)
bio$species_params$predator$ED_ini <- 5000
bio$species_params$predator$ED_end <- 5500
result <- run_fb4(bio, strategy = "direct", p_value = 0.5, verbose = FALSE)
eff <- get_efficiency_uncertainty(result)
# }

Run the code above in your browser using DataLab