SQ_optim: Main function for parameter estimation

View source: R/SQ_optim.R

SQ_optimR Documentation

Main function for parameter estimation

Description

Main function for parameter estimation

Usage

SQ_optim(
  crit_function,
  optim_method,
  obs_daily_path,
  obs_sum_path,
  dailyVar,
  sumVar,
  obs_sim_path,
  project_path,
  output_path,
  console_path,
  param_info,
  optim_options,
  run2simulate,
  cores_nb,
  time_display,
  saves_daily_output,
  print_console
)

Arguments

crit_function

Criterium to optimise depends on the chosen method : Simplex : "crit_log_cwss", "crit_log_cwss_corr", "crit_ols" Dreamzs : "likelihood_log_ciidn" , "likelihood_log_ciidn_corr"

optim_method

Estimation method (Dreamzs, Simplex)

obs_daily_path

Path to daily observations

obs_sum_path

Path to summary observations

dailyVar

Vector of variables names to estimate (variables from daily file)

sumVar

Vector of the variables names to estimate (variables from summary file)

obs_sim_path

Path to the data frame which matches between the names of the simulated and observed variables

project_path

Path to the directory of input files

output_path

Path where to save results

console_path

Path to the console

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)

optim_options

List of options of the parameter estimation method, containing:

  • path_results The path where to store the results (optional, default=getwd())

  • specific options depending on the method used. Click on the links to see examples with the simplex and DreamZS methods.

run2simulate

Run name to simulate

cores_nb

Number of cores to simulate on

time_display

Flag (TRUE/FALSE) for display of calculation time

saves_daily_output

Boolean to save daily output (if set to "true")

print_console

Boolean to print information on the simulation progression on the console (if set to "false")

Value

prints, graphs and a list containing the results of the parameter estimation, All results are saved in the folder optim_options$path_results.


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