Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stéphane Adjemian
dynare
Commits
f0b9f453
Commit
f0b9f453
authored
Aug 29, 2017
by
Johannes Pfeifer
Committed by
Stéphane Adjemian
Oct 4, 2017
Browse files
Options
Downloads
Patches
Plain Diff
Make empirical moments independent of simul_replic by outputting first instead of later replication
Closes #1487
parent
0f84dadb
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/simult.m
+5
-2
5 additions, 2 deletions
matlab/simult.m
tests/example2.mod
+8
-0
8 additions, 0 deletions
tests/example2.mod
with
13 additions
and
2 deletions
matlab/simult.m
+
5
−
2
View file @
f0b9f453
function
[
y_
,
DynareResults
]
=
simult
(
y0
,
dr
,
DynareModel
,
DynareOptions
,
DynareResults
)
function
[
y_
out
,
DynareResults
]
=
simult
(
y0
,
dr
,
DynareModel
,
DynareOptions
,
DynareResults
)
%
Simulate
a
DSGE
model
(
perturbation
approach
).
%
Simulate
a
DSGE
model
(
perturbation
approach
).
%
@info
:
%
@info
:
...
@@ -25,7 +25,7 @@ function [y_,DynareResults] =simult(y0, dr,DynareModel,DynareOptions,DynareResul
...
@@ -25,7 +25,7 @@ function [y_,DynareResults] =simult(y0, dr,DynareModel,DynareOptions,DynareResul
%!
@strong
{
Outputs
}
%!
@strong
{
Outputs
}
%!
@sp
1
%!
@sp
1
%!
@table
@
@var
%!
@table
@
@var
%!
@item
y_
%!
@item
y_
out
%!
Matrix
of
doubles
,
simulated
time
series
for
all
the
endogenous
variables
(
one
per
row
).
%!
Matrix
of
doubles
,
simulated
time
series
for
all
the
endogenous
variables
(
one
per
row
).
%!
@item
DynareResults
%!
@item
DynareResults
%!
Matlab
'
s
structure
gathering
the
results
(
see
@ref
{
oo_
}).
%!
Matlab
'
s
structure
gathering
the
results
(
see
@ref
{
oo_
}).
...
@@ -88,6 +88,9 @@ for i=1:replic
...
@@ -88,6 +88,9 @@ for i=1:replic
if
replic
>
1
if
replic
>
1
fwrite
(
fh
,
y_
,
'
float64
'
);
fwrite
(
fh
,
y_
,
'
float64
'
);
end
end
if
i
==
1
y_out
=
y_
;
end
end
end
if
replic
>
1
if
replic
>
1
...
...
This diff is collapsed.
Click to expand it.
tests/example2.mod
+
8
−
0
View file @
f0b9f453
...
@@ -41,3 +41,11 @@ var u = 0.009^2;
...
@@ -41,3 +41,11 @@ var u = 0.009^2;
end;
end;
stoch_simul(periods=2000, drop=200);
stoch_simul(periods=2000, drop=200);
%% test that simul_replic does not affect simulated moments
moments_temp=oo_.var;
set_dynare_seed('default');
stoch_simul(periods=2000, drop=200,simul_replic=2);
if ~isequal(moments_temp,oo_.var)
error('Simul_replic affects simulated moments')
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment