Create default parameters for a FIMS model
Source:R/create_default_parameters.R
create_default_parameters.Rd
This function generates default parameter settings for a Fisheries Integrated Modeling System (FIMS) model, including recruitment, growth, maturity, population, and fleet configurations. It applies default configurations when specific module settings are not provided by the user.
This function updates the input parameters of a Fisheries Integrated Modeling System (FIMS) model. It allows users to modify specific parameters by providing new values, while retaining the existing modules information from the current input.
Arguments
- data
An S4 object. FIMS input data.
- fleets
A named list of settings for the fleet module. Each element of the list should specify a fleet's selectivity form and settings for the data distribution. If this argument is missing, default values will be applied for each fleet that is not specified but present in
data
based on the types of information present for that fleet.- recruitment
A list specifying the settings for the recruitment module. The default is a Beverton–Holt recruitment relationship with log-normal recruitment deviations.
- growth
A list specifying the settings for the growth module. The default is
"EWAAgrowth"
.- maturity
A list specifying the settings for the maturity module. The default is
"LogisticMaturity"
.- current_parameters
A list containing the current input parameters, including:
parameters
:A list of parameter inputs.
modules
:A list of module names used in the model.
- modified_parameters
A named list representing new parameter values to update.
Value
A list containing the following two entries:
parameters
:A list of parameter inputs for the FIMS model.
modules
:A list of modules with default or user-provided settings.
A list containing:
- parameters
A list of updated parameter inputs that includes any modifications made by the user.
- modules
The unchanged list of module names from the current input.
Examples
if (FALSE) { # \dontrun{
data("data1")
fims_frame <- FIMSFrame(data1)
fleet1 <- survey1 <- list(
selectivity = list(form = "LogisticSelectivity"),
data_distribution = c(
Index = "DlnormDistribution",
AgeComp = "DmultinomDistribution"
)
)
fleet2 <- list(
selectivity = list(form = "DoubleLogisticSelectivity"),
data_distribution = c(
Index = "DlnormDistribution",
AgeComp = "DmultinomDistribution",
LengthComp = "DmultinomDistribution"
)
)
default_parameters <- fims_frame |>
create_default_parameters(
fleets = list(fleet1 = fleet1, fleet2 = fleet2, survey1 = survey1),
recruitment = list(
form = "BevertonHoltRecruitment",
process_distribution = c(log_devs = "DnormDistribution")
),
growth = list(form = "EWAAgrowth"),
maturity = list(form = "LogisticMaturity")
)
} # }