check_inputs: Check Inputs

View source: R/input_checks.R

check_inputsR Documentation

Check Inputs

Description

Function to check that the inputs given to the function opt_des are correct. If not, throws the correspondent error message.

Usage

check_inputs(
  criterion,
  model,
  parameters,
  par_values,
  design_space,
  init_design,
  join_thresh,
  delete_thresh,
  delta,
  tol,
  tol2,
  par_int,
  matB,
  reg_int,
  weight_fun
)

Arguments

criterion

character variable with the chosen optimality criterion.

model

formula describing the model. For single-factor models use x as the design variable; for multi-factor models use x1, x2, etc.

parameters

character vector with the parameter names.

par_values

numeric vector with the nominal parameter values.

design_space

For single-factor models: numeric vector c(min, max). For multi-factor models: named list list(x1 = c(min, max), x2 = c(min, max), ...).

init_design

optional dataframe with the initial design. For single-factor models use columns Point and Weight; for multi-factor models use one column per design variable plus Weight.

join_thresh

optional numeric threshold for merging nearby design points.

delete_thresh

optional numeric minimum weight to keep a support point.

delta

optional numeric in (0, 1), damping parameter of the algorithm.

tol

optional numeric for convergence of the weight loop.

tol2

optional numeric for the outer stop condition.

par_int

optional numeric vector of parameter indices for Ds-optimality.

matB

optional k x k matrix for L-optimality.

reg_int

optional bounds for the I-optimality integration region. Single-factor: c(min, max). Multi-factor: named list matching design_space.

weight_fun

optional variance-structure weight function.


optedr documentation built on June 23, 2026, 5:07 p.m.