add_estimation_step: add_estimation_step

View source: R/functions_wrapper.R

add_estimation_stepR Documentation

add_estimation_step

Description

Add estimation step

Adds estimation step for a model in a given index. Methods currently supported are: FO, FOCE, ITS, LAPLACE, IMPMAP, IMP, SAEM

Usage

add_estimation_step(
  model,
  method,
  idx = NULL,
  interaction = FALSE,
  parameter_uncertainty_method = NULL,
  evaluation = FALSE,
  maximum_evaluations = NULL,
  laplace = FALSE,
  isample = NULL,
  niter = NULL,
  auto = NULL,
  keep_every_nth_iter = NULL,
  residuals = c(),
  predictions = c(),
  solver = NULL,
  solver_rtol = NULL,
  solver_atol = NULL,
  tool_options = {
 },
  derivatives = c(),
  individual_eta_samples = FALSE
)

Arguments

model

(Model) Pharmpy model

method

(str) estimation method to change to

idx

(numeric (optional)) index of estimation step (starting from 0), default is NULL (adds step at the end)

interaction

(logical) See :class:~pharmpy.model.EstimationStep for more information on options

parameter_uncertainty_method

(str (optional)) See above

evaluation

(logical) See above

maximum_evaluations

(numeric (optional)) See above

laplace

(logical) See above

isample

(numeric (optional)) See above

niter

(numeric (optional)) See above

auto

(logical (optional)) See above

keep_every_nth_iter

(numeric (optional)) See above

residuals

(array(str)) See above

predictions

(array(str)) See above

solver

(str (optional)) See above

solver_rtol

(numeric (optional)) See above

solver_atol

(numeric (optional)) See above

tool_options

(list(str=any)) See above

derivatives

(array(array(Expr))) See above

individual_eta_samples

(logical) See above

Value

(Model) Pharmpy model object

See Also

set_estimation_step

remove_estimation_step

append_estimation_step_options

add_parameter_uncertainty_step

remove_parameter_uncertainty_step

set_evaluation_step

Examples

## Not run: 
model <- load_example_model("pheno")
opts <- list('NITER'=1000, 'ISAMPLE'=100)
model <- add_estimation_step(model, 'IMP', tool_options=opts)
ests <- model$execution_steps
length(ests)
ests[2]

## End(Not run)

pharmr documentation built on June 8, 2025, 11:22 a.m.