fit: Fitting Data to Model

View source: R/fit.R

fitR Documentation

Fitting Data to Model

Description

Fitting Data to Model

Usage

fit(
  data,
  prm.abc,
  df.priors,
  prm,
  n.cores,
  last.date = NULL,
  save.rdata = FALSE
)

Arguments

data

List. Output of function build_data()

prm.abc

List. Variables for ABC fitting. Output of function define_abc_prms()

df.priors

Dataframe. Parameters ('name'), their distribution ('distrib') and range of values ('prms') which to be fitted to the model. Output of function define_fit_priors().

prm

List. Initial parameters for fitting plot. Output of function load_prm().

n.cores

Numeric. number of cores used for fitting computation.

last.date

Date. Last date to stop fitting (e.g., ymd('2021-02-01') or NULL). NULL = latest date available.

save.rdata

Logical. Saving the fitting objects in a .rds file.

do.plot

Logical. Plot the fitting results and initial parameters

Value

A list containing the fitted object and additional information.


phac-nml-phrsd/wem documentation built on June 6, 2024, 11:06 p.m.