Extra column in oo_.endo_simul

This model has 14 variables, including 5 observables.

But after simulation, the simulation output has 15 columns (oo_.endo_simul). Where does the extra column come from?

(To confuse things futher, oo_.var_list has only 14 entries)

LS_sim.mod (2.0 KB)
Output:
LS_sim_results.mat (1.2 MB)

If I may ask, what is the number of rows in oo_.endo_simul?

MATLAB/Octave variable: oo_.endo_simul
This variable stores the result of a deterministic simulation (computed by
perfect_foresight_solver or simul) or of a stochastic simulation (computed by stoch_simul
with the periods option or by extended_path). The variables are arranged row by row, in order of declaration (as in M_.endo_names). Note that this variable also contains initial and terminal conditions, so it has more columns than the value of periods option.

It’s a simulation of 8500 periods, i.e.

stoch_simul(periods = 8500, nomoments, irf=0, nograph); 

endo_simul has 15 rows

    endo_simul =

     Columns 1 through 10:

        1.55409    2.30806    2.42416    5.15431    7.83616    7.59427    6.00006    5.02661    8.48806    6.98539
       -0.04582    0.30258   -0.00327    0.46241    0.26182    1.53678    1.40303    1.72782    1.32707    0.50804
       -2.44967   -0.04496   -0.71895   -3.19395   -1.84376    0.89295    0.62428    1.55181   -1.35617    2.17588
        0.95480    0.49813    1.17182    2.21250    1.56501    2.56021    5.22645    6.51797    5.64357    5.45798
       -0.13133    0.02513   -0.04791    0.21342    0.50369    0.57711    0.12823    0.48932    0.85920    0.48130
       -0.41321   -0.33123   -0.44247   -0.44849   -0.79988   -0.13615   -1.32039   -1.63649   -3.39928   -3.40966
       -0.30123   -0.40196   -0.32201   -0.76437   -0.79245   -1.31279   -1.98670   -2.39544   -3.25036   -2.59234
        0.65096    0.86864    0.69586    1.65182    1.71250    2.83695    4.29329    5.17658    7.02409    5.60209
        0.48504    0.14838    0.45955   -0.45094   -0.38360   -1.73934    0.28194   -0.13222    1.04678    2.39739
        1.55409    0.75397    0.11610    2.73016    2.68185   -0.24189   -1.59420   -0.97346    3.46146   -1.50267
       -0.18327    1.21033   -0.01308    1.84966    1.04727    6.14713    5.61213    6.91126    5.30827    2.03215
        0.95480   -0.45666    0.67369    1.04068   -0.64749    0.99520    2.66624    1.29153   -0.87441   -0.18559
       -0.52531    0.10054   -0.19163    0.85369    2.01476    2.30843    0.51294    1.95728    3.43681    1.92522
        0.07182    0.23036    0.34831   -0.45695   -0.73499   -1.07561   -0.90230   -0.44831   -0.71601    2.38700
        0.00000    0.95480    0.49813    1.17182    2.21250    1.56501    2.56021    5.22645    6.51797    5.64357

which matches length of endo names.

    endo_names_long =

e
pi
pis
q
r
y
yp
ys
z
obs_e
obs_pi
obs_q
obs_r
obs_y
AUX_ENDO_LAG_3_1

You can read on AUX_ENDO_LAG in dynare manual.

1 Like

Thanks! Good to know - I’ll just remove it then for my purposes.

The simulations in oo_.endo_simul will always contain all endogenous variables including auxiliary variables. Thus, the size corresponds to M_.endo_names.