initializePrior {RGAP}R Documentation

Initialization of prior distributions

Description

Initializes the prior distributions for a model of class TFPmodel or NAWRUmodel.

Usage

initializePrior(model, MLE = !is.null(MLEfit), MLEfit = NULL)

Arguments

model

An object of class TFPmodel or NAWRUmodel.

MLE

(Optional) A logical indicating whether the MLE estimates should be used for the initialization. The default is MLE = FALSE if MLEfit is not provided and vice versa.

MLEfit

(Optional) An object of class TFPfit or NAWRUfit which is used if MLE = TRUE.

Value

A list of three matrices with parameters for the prior distribution and box constraints. Each list item refers to an equation, namely the cycle, trend, and second observation equation. Each list element is a 4 x n matrix where n denotes the number of parameters involved in the respective equation. The upper two elements specify the distribution, the lower two parameters specify box constraints. NA denotes no constraints. Autoregressive parameters are automatically restricted to the stationary region unless box constraints are specified. The respective prior distributions are defined through their mean and standard deviation. For instance, prior$cycle[, 1] contains the mean, standard deviation, lower and upper bound for the first variable, in that respective order.


[Package RGAP version 0.1.1 Index]