helper_model_fit: model selection helper function

View source: R/model_selection.R

helper_model_fitR Documentation

model selection helper function

Description

Defines and fits models given the input parameters

Usage

helper_model_fit(FUNmodel, FUNfit, tsl, comb, poss, method, type, q, modelName)

Arguments

FUNmodel

The model fitting function.

tsl

A list of time series objects, see details.

comb

A nested list with one model specification per list entry.

poss

A list with the characteristics of possible models (see autoGapProd)

method

The estimation method. Options are maximum likelihood estimation "MLE" and bayesian estimation "bayesian". If method = c("MLE", "bayesian") the NAWRU is fitted by MLE and the TFP trend by Bayesian methods. The default is method = "MLE".

type

The variance restriction type. Possible options are "basic", "hp", see initializeRestr. The default is type = "hp".

q

Quantile for the Inverse Gamma distribution (only used if type = "hp"), see initializeRestr. The default is q = 0.01.

modelName

Name of the model, i.e., NAWRU or TFP.

Value

A nested list with the models and fitted objects.


RGAP documentation built on Nov. 2, 2023, 6:02 p.m.