View source: R/15.3-analysis-sensitivity.R
| analyze_growth_temperature_sensitivity | R Documentation |
Analyzes how growth rates respond to different temperature and feeding level combinations. Uses p-values (proportion of maximum consumption capacity) to simulate feeding scenarios from survival levels (p ~0.2) to maximum capacity (p = 1.0). Parallelized for efficiency.
analyze_growth_temperature_sensitivity(
bio_obj,
temperatures = seq(8, 18, by = 2),
p_values = seq(0.3, 1, by = 0.1),
simulation_days = 365,
oxycal = 13560,
parallel = FALSE,
n_cores = NULL,
verbose = TRUE
)
bio_obj |
Bioenergetic object containing species parameters and environmental data |
temperatures |
Vector of temperatures to test in °C (default: 8-18°C by 2°C steps) |
p_values |
Vector of p-values representing feeding levels as proportion of Cmax (default: 0.3-1.0) |
simulation_days |
Number of days to simulate (default: 365) |
oxycal |
Oxycalorific coefficient in J/g O2 (default: 13560) |
parallel |
Use parallel processing (default: FALSE) |
n_cores |
Number of cores for parallel processing (default: detectCores() - 1) |
verbose |
Show progress information (default: TRUE) |
A data frame with one row per temperature-p_value combination and columns:
temperatureTemperature tested (°C).
p_valueFeeding level (proportion of Cmax) tested.
growth_rateSpecific growth rate (percent per day).
final_weightPredicted final weight (g).
total_consumptionTotal consumption over the simulation period (g).
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
results <- analyze_growth_temperature_sensitivity(
bio,
temperatures = c(2, 14),
p_values = c(0.4, 0.7),
simulation_days = 30,
verbose = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.