fit_recent: Fitting model to recent data only, using existing fit on past...

View source: R/fit.R

fit_recentR Documentation

Fitting model to recent data only, using existing fit on past data.

Description

Fitting model to recent data only, using existing fit on past data.

Usage

fit_recent(
  data,
  prm.abc,
  fitobj.past,
  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()

fitobj.past

List as returned by the function fit(). Fit object for past data.

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.