set_priors: Set the priors for estimation

Description Usage Arguments Value Author(s) Examples

View source: R/package_functions.R

Description

Set the priors for estimation

Usage

1
2
set_priors(yy_s, prior, panelID, timeID, n_states = 2, ms_var = F,
  detect.formula = F, formulas = c("y ~ c + e.l1 + e.l2"))

Arguments

yy_s

Multivariate time series of standardized data values from data_trans

prior

"estimate", "uninformative" or vector of named prior parameter guesses: DCF AR coefficients: phi1 and phi2 only; Error MA coefficients: psi_i1 to psi_i2 only for each series i; Error standard deviation: sigma_i only for each series i; Observation coefficient on DCF with first gamma (gamma_i, ..., gamma_n) only 1 index number, not i0 and any more gammas per equation: gamma_i1 to gamma_ik; Markov switching growth rate: mu_d and mu_u; Transition probabilities: p_dd, p_md (or p_mu), p_mm, p_md (or p_mu), p_uu, p_ud (or p_um)

panelID

Column name that identifies the cross section of the data

timeID

Column name that identifies the date

n_states

Number of states to include in the Markov switching model

ms_var,

Logical, T for Markow switching variance, default is F

detect.formula

Logical, detect lag length of the dynamic common factor to include in each observation equation using the cross correlation function up to a max of 3

formulas

R formula describing the relationship between each data series, the unobserved dynamic common factor, and the erorr structure

Value

vector of initial coefficient values

Author(s)

Alex Hubbard (hubbard.alex@gmail.com)

Examples

1
set_priors(yy_s = yy_s, prior = prior, panelID = "panel", timeID = "date")

opendoor-labs/MarkovSwitchingDCF documentation built on Jan. 8, 2020, 12:24 p.m.