complete_init_values: Complete initial values in param_info by sampling values from...

View source: R/param_info_functions.R

complete_init_valuesR Documentation

Complete initial values in param_info by sampling values from bounds taking into account inequality constraints between parameters

Description

Complete initial values in param_info by sampling values from bounds taking into account inequality constraints between parameters

Usage

complete_init_values(
  param_info,
  nb_values,
  ranseed = NULL,
  satisfy_par_const = NULL
)

Arguments

param_info

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

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

  • 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:

  • sit_list, list the groups of situations for which the current estimated parameter must take different values (see here for an example),

  • ub and lb, vectors of upper and lower bounds (one value per group),

  • init_values, the list of initial values per group (data.frame, one column per group, optional).

nb_values

Total number of initial values required for the parameters

ranseed

Set random seed so that each execution give the same results. If you want randomization, set it to NULL

satisfy_par_const

User function for including constraints on estimated parameters (optional), see details section for more information.

Value

A list similar to param_info including nb_values initial values. If param_info initially contains less than nb_values initial values, additional ones are randomly sampled in the defined bounds taking into account the possible constraints between the parameters.


SticsRPacks/CroptimizR documentation built on Dec. 16, 2024, 11:54 a.m.