View source: R/11.4-main-validators.R
| validate_fb4_inputs | R Documentation |
Validates all inputs for FB4 simulation, including the Bioenergetic object and strategy-specific parameters.
validate_fb4_inputs(
bio_obj,
strategy,
fit_to = NULL,
fit_value = NULL,
first_day = 1,
last_day = NULL,
observed_weights = NULL,
covariates = NULL
)
bio_obj |
Bioenergetic object |
strategy |
Strategy to use: "binary_search", "optim", "bootstrap", "mle", "hierarchical" |
fit_to |
Fitting target (for traditional strategies) |
fit_value |
Fitting value (for traditional strategies) |
first_day |
First simulation day |
last_day |
Last simulation day |
observed_weights |
Vector of observed weights (for statistical strategies) |
covariates |
Covariates (for hierarchical strategy) |
Invisibly returns TRUE if all inputs are valid. Throws an
error with a descriptive message at the first validation failure: invalid
day range, unrecognised strategy, missing fit_to/fit_value
for traditional strategies, or missing observed_weights for
statistical strategies.
# Requires a fully-configured Bioenergetic object; see ?Bioenergetic
# validate_fb4_inputs(bio, strategy = "direct",
# fit_to = "Weight", fit_value = 200,
# first_day = 1, last_day = 365)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.