Skip to contents

Wrapper function that calls RTMB to create the model and perform the numerical optimization

Usage

fit_MARS(
  MARSdata,
  parameters,
  map = list(),
  random = NULL,
  run_model = TRUE,
  do_sd = TRUE,
  report = TRUE,
  silent = FALSE,
  control = list(iter.max = 2e+05, eval.max = 4e+05),
  ...
)

Arguments

MARSdata

Data object. Class MARSdata, validated by check_data()

parameters

List of parameters, e.g., returned by make_parameters() and validated by check_parameters().

map

List of parameters indicated whether they are fixed and how they are shared, e.g., returned by make_parameters(). See TMB::MakeADFun().

random

Character vector indicating the parameters that are random effects, e.g., returned by make_parameters().

run_model

Logical, whether to fit the model through stats::nlminb().

do_sd

Logical, whether to calculate the standard errors with TMB::sdreport().

report

Logical, whether to return the report list with obj$report(obj$env$last.par.best).

silent

Logical, whether to report progress to console. Not passed to TMB::MakeADFun().

control

Passed to stats::nlminb()

...

Other arguments to TMB::MakeADFun().

Value

A MARSassess object.