fitModel: General Model Fitting Function

View source: R/Module_fitModel.R

fitModelR Documentation

General Model Fitting Function

Description

This function applies the estimation step for the various models. It sets up the data inputs (e.g. loop through age classes, ) and calls the estimation subroutine then stores the output in a list object. Model-specific sub-routines live in the file "Module_Sub_EstimationFunctions.R".

Usage

fitModel(
  model = c("Naive", "ReturnRate", "Mechanistic", "SibRegSimple", "SibRegKalman",
    "SibRegLogPower", "SibRegPooledSimple", "TimeSeriesArima", "TimeSeriesExpSmooth"),
  data = NULL,
  data.sibreg = NULL,
  settings = NULL,
  tracing = FALSE
)

Arguments

model

A character vector of length one. The name of a model, it has to match one of the model names in the "estimation.functions" list objects. which is generated from the script R/Module_Sub_EstimationFunctions.R.

data

Same as the data element from the list object generated by prepData()

data.sibreg

Same as the sibling regression input element *sibreg.in* from the list object generated by prepData()

settings

A list. Model-specific list of settings, where applicable.

tracing

A Boolean. Default is FALSE.

Details

FOR NOW: JUST MAKING THIS WORK WITH THE BASIC SIBLING REGRESSION AND KALMAN FILTER SIBLING REGRESSION

Value

A list.


SalmonForecastR/ForecastR-Package documentation built on March 10, 2023, 2:18 p.m.