Skip to content

Initial beliefs

The learners need beliefs to start from. By default they start at beliefs.init.date (the first filter date plus four quarters; 1966Q1 for SW07) and learn from there to the forecast origin, so by 2022Q2 the starting point matters little. You can also impose beliefs directly at the origin.

Option Values (default first) Meaning
beliefs.init.method 're_moments', 'training_ols', 'user' From the RE model's unconditional moments; from OLS on a training range of the RE history; your values
beliefs.init.date [] Date of the initial beliefs; [] = first filter date + 4 quarters
beliefs.init.values.<x> .alpha, .beta (or .phi), optional .R Your values ('user'); anything missing comes from the RE moments
beliefs.init.training_range [start, end] Required for 'training_ols'
beliefs.update 'rls', 'fixed' Learn by RLS, or hold the beliefs at their initial values
history.learn true, false Learn over the history; false = the initial beliefs and shares apply at the origin
shares.init_n2 0.5 Learners' share at beliefs.init.date (Shares and switching)

The methods

're_moments' (default; Özden 2025, sec. 3.1). The beliefs are the population regression coefficients of the PLM in the RE model, \(\phi_0 = E[z z']^{-1} E[z v]\) and \(R_0 = E[z z']\), from the RE model's unconditional moments. Learners start as if they had estimated their PLM on a long sample generated by the RE economy.

'training_ols'. OLS of the PLM on the RE history over training_range (smoothed or filtered, as set by history.re_states), with \(R_0\) the sample second-moment matrix.

'user'. Your values, by learning variable. Units are model units (SW07: percent per quarter). Fields you leave out come from the RE moments.

The initial beliefs are \(\phi_{t-1}\) for \(t\) = beliefs.init.date: they make the learners' forecast in that quarter, and the first RLS update uses that quarter's data.

Examples

% Start learning in 1985Q1 from OLS on 1966Q1-1984Q4
cfg = a1_learn(); cfg.id = 'a1_init_ols';
cfg.beliefs.init.date = qq(1985, 1);
cfg.beliefs.init.method = 'training_ols';
cfg.beliefs.init.training_range = [qq(1966, 1), qq(1984, 4)];
res = hetlearn.run(cfg, 'save', false);

% Your own starting beliefs: perceived mean 0.1/(1 - 0.8) = 0.5% a quarter (2% a year)
cfg = a1_learn(); cfg.id = 'a1_init_user';
cfg.beliefs.init.method = 'user';
cfg.beliefs.init.values.pinf = struct('alpha', 0.1, 'beta', 0.8);
res = hetlearn.run(cfg, 'save', false);

% Only the moment matrix (Kostyshyna, Ozden and Zhang's R0 = 0.001*I)
cfg = a1_learn(); cfg.id = 'a1_init_R';
cfg.beliefs.init.method = 'user';
cfg.beliefs.init.values.pinf.R = 0.001*eye(2);

% Beliefs that never change; the shares still switch
cfg = a1_learn(); cfg.id = 'a1_fixed_beliefs';
cfg.beliefs.update = 'fixed';
res = hetlearn.run(cfg, 'save', false);

Impose beliefs at the origin

With history.learn = false there is no learning over the history: the initial beliefs and shares apply directly at the forecast origin, and the forecast starts from them. This is the way to ask "what if the learners believed this in 2022Q2":

cfg = a1_learn(); cfg.id = 'a1_whatif_beliefs';
cfg.history.learn = false;
cfg.beliefs.init.method = 'user';
cfg.beliefs.init.values.pinf = struct('alpha', 0.1, 'beta', 0.8);   % anchored learners
cfg.shares.init_n2 = 0.5;
res = hetlearn.run(cfg, 'save', false);

The forecast then updates beliefs and shares as usual. If the model has no stable solution with these beliefs and shares, the run stops with hetlearn:engine:almUnstable: the projection facility has no earlier solved model to fall back on.

In the project

Every SW07 scenario uses the defaults: RE-moment beliefs in 1966Q1 and a share of 0.5. The learners' AR(1) coefficient then moves between 0.27 and 1.06 over 1966Q1-2022Q2 (Application 1, step 5).