Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dynare
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
122
Issues
122
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dynare
dynare
Commits
b38d6f81
Verified
Commit
b38d6f81
authored
Jan 17, 2021
by
Johannes Pfeifer
Committed by
Stéphane Adjemian
Jan 22, 2021
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compute_moments_varendo: use pruned state space at higher order
parent
314948ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
matlab/dsge_simulated_theoretical_correlation.m
matlab/dsge_simulated_theoretical_correlation.m
+15
-1
matlab/dsge_simulated_theoretical_covariance.m
matlab/dsge_simulated_theoretical_covariance.m
+12
-1
No files found.
matlab/dsge_simulated_theoretical_correlation.m
View file @
b38d6f81
...
...
@@ -71,6 +71,13 @@ if ~posterior
end
nvar
=
length
(
ivar
);
if
options_
.
pruning
obs_var
=
NaN
(
nvar
,
1
);
for
i
=
1
:
nvar
obs_var
(
i
,
1
)
=
find
(
strcmp
(
M_
.
endo_names
(
ivar
(
i
),:),
M_
.
endo_names
(
oo_
.
dr
.
order_var
)));
end
end
% Set the size of the auto-correlation function to nar.
oldnar
=
options_
.
ar
;
options_
.
ar
=
nar
;
...
...
@@ -109,7 +116,14 @@ for file = 1:NumberOfDrawsFiles
M_
=
set_parameters_locally
(
M_
,
temp
.
pdraws
{
linee
,
1
});
[
dr
,
info
,
M_
,
options_
,
oo_
]
=
resol
(
0
,
M_
,
options_
,
oo_
);
end
tmp
=
th_autocovariances
(
dr
,
ivar
,
M_
,
options_
,
nodecomposition
);
if
~
options_
.
pruning
tmp
=
th_autocovariances
(
dr
,
ivar
,
M_
,
options_
,
nodecomposition
);
else
pruned_state_space
=
pruned_state_space_system
(
M_
,
options_
,
dr
,
obs_var
,
options_
.
ar
,
1
,
0
);
for
i
=
1
:
nar
tmp
{
i
+
1
}
=
pruned_state_space
.
Corr_yi
(:,:,
i
);
end
end
for
i
=
1
:
nar
Correlation_array
(
linea
,:,:,
i
)
=
tmp
{
i
+
1
};
end
...
...
matlab/dsge_simulated_theoretical_covariance.m
View file @
b38d6f81
...
...
@@ -70,6 +70,12 @@ if ~posterior
end
nvar
=
length
(
ivar
);
if
options_
.
pruning
obs_var
=
NaN
(
nvar
,
1
);
for
i
=
1
:
nvar
obs_var
(
i
,
1
)
=
find
(
strcmp
(
M_
.
endo_names
(
ivar
(
i
),:),
M_
.
endo_names
(
oo_
.
dr
.
order_var
)));
end
end
% Set the size of the auto-correlation function to zero.
nar
=
options_
.
ar
;
options_
.
ar
=
0
;
...
...
@@ -108,7 +114,12 @@ for file = 1:NumberOfDrawsFiles
M_
=
set_parameters_locally
(
M_
,
temp
.
pdraws
{
linee
,
1
});
[
dr
,
info
,
M_
,
options_
,
oo_
]
=
resol
(
0
,
M_
,
options_
,
oo_
);
end
tmp
=
th_autocovariances
(
dr
,
ivar
,
M_
,
options_
,
nodecomposition
);
if
~
options_
.
pruning
tmp
=
th_autocovariances
(
dr
,
ivar
,
M_
,
options_
,
nodecomposition
);
else
pruned_state_space
=
pruned_state_space_system
(
M_
,
options_
,
dr
,
obs_var
,
options_
.
ar
,
1
,
0
);
tmp
{
1
}
=
pruned_state_space
.
Var_y
;
end
for
i
=
1
:
nvar
for
j
=
i
:
nvar
Covariance_matrix
(
linea
,
symmetric_matrix_index
(
i
,
j
,
nvar
))
=
tmp
{
1
}(
i
,
j
);
...
...
Johannes Pfeifer
@JohannesPfeifer
mentioned in issue
#1757 (closed)
·
Jan 23, 2021
mentioned in issue
#1757 (closed)
mentioned in issue #1757
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment