get_param_names: Extract param names from parameter information

View source: R/get_param_names.R

get_param_namesR Documentation

Extract param names from parameter information

Description

Extract param names from parameter information

Usage

get_param_names(param_info, short_list = FALSE)

Arguments

param_info

Information on the parameters to estimate. #' Either a list containing:

  • (named) vectors of upper and lower bounds (ub and lb) (-Inf and Inf can be used),

  • init_values, A data.frame containing initial values to test for the parameters (optional, if not provided, or if less values than number of repetitions of the minimization are provided, the, or part of the, initial values will be randomly generated using LHS sampling within parameter bounds).

or a named list containing for each parameter the list of situations per group (sit_list), the vector of upper and lower bounds (one value per group) (ub and lb) and the list of initial values per group init_values (data.frame, one column per group, optional). (see here for an example)

short_list

TRUE to return a list without replicated parameters which happens for simultaneous estimation of specific and varietal parameters (optional, default=FALSE)

Value

A vector of parameter names

Examples


# A simple case
param_info <- list(
  lb = c(dlaimax = 0.0005, durvieF = 50),
  ub = c(dlaimax = 0.0025, durvieF = 400)
)
SQoptimizR:::get_param_names(param_info)

# A case with groups of situations per parameter
param_info <- list()
param_info$dlaimax <- list(
  sit_list = list(c(
    "bou99t3", "bou00t3", "bou99t1", "bou00t1",
    "bo96iN+", "lu96iN+", "lu96iN6", "lu97iN+"
  )),
  lb = 0.0005, ub = 0.0025
)
param_info$durvieF <- list(
  sit_list = list(
    c("bo96iN+", "lu96iN+", "lu96iN6", "lu97iN+"),
    c("bou99t3", "bou00t3", "bou99t1", "bou00t1")
  ),
  lb = c(50, 50), ub = c(400, 400)
)
SQoptimizR:::get_param_names(param_info)
SQoptimizR:::get_param_names(param_info, short_list=TRUE)




aafaf-arharas/SQoptimizR documentation built on March 25, 2022, 12:18 a.m.