File: initialization.mod

package info (click to toggle)
dynare 6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 67,796 kB
  • sloc: cpp: 79,110; ansic: 28,917; objc: 12,445; yacc: 4,537; pascal: 1,993; lex: 1,441; sh: 1,132; python: 634; makefile: 628; lisp: 163; xml: 18
file content (28 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
%% CODE TO SIMULATE LOGISTIC MAP
%% DECLARATION OF ENDOGENOUS VARIABLES
var x;
parameters r s;

r=3.8;
s=0;

model;
x = r*x(-1)*(1 - x(-1)) + s*x(+1);
end;

initval;
x = 0;
end;

check;

%% DETERMINISTIC SIMULATION
perfect_foresight_setup(periods = 40);
perfect_foresight_solver(stack_solve_algo=0, maxit=100);

if ~oo_.deterministic_simulation.status
   error('Perfect foresight simulation failed')
end

dsample 40;
rplot x;