# How to compute the decision rule matrix oo_.dr.ghx of a deterministic model?

Hello,

I am trying to get the decision rule matrix oo_.dr.ghx

If I understand well, it is computed by running the command stoch_simul, but I get the following error:

error: tril: requested diagonal out of range

Below is a trivial code example. I must be missing something obvious.

Thanks a lot for your help!

Best,
Thibaut

``````var K q;

parameters
a b delta r alpha dt
K_inf q_inf;

a=1;
b=1;
delta = 0.023;
alpha = 0.33;
r = 0.01;
dt=1;
q_inf = 1+(1+a)*b*delta^a;
K_inf = (((r+delta)*q_inf-a*b*delta^(a+1))/alpha)^(1/(alpha-1));

model;
# I = K(-1)*((q-1)/((1+a)*b))^(1/a);
# w = alpha*K(-1)^(alpha-1)+a*b*(I/K(-1))^(a+1);
K = K(-1) + (I-delta*K(-1))*dt;
q(+1) = q + (r+delta)*q*dt - w*dt;
end;

K = K_inf;
q = q_inf;
end;

initval;
K = 20;
q = q_inf;
end;

endval;
K = K_inf;
q = q_inf;
end;

check;

stoch_simul(noprint, order=1);``````

It seems actually that stoch_simul needs some stochastic exogenous variables to be defined.
How could I then compute the decision rule matrix oo_.dr.ghx with a deterministic model?
Thx!
Thibaut

Thanks for reporting this. Simply add an unused exogenous variable

``````varexo junk;
``````

and use the `nostrict` option at command line.

1 Like
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8389301896095276, "perplexity": 6562.424167252413}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-21/segments/1652662572800.59/warc/CC-MAIN-20220524110236-20220524140236-00368.warc.gz"}