Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
e84b8de4
Commit
e84b8de4
authored
Nov 29, 2012
by
Stéphane Adjemian
Browse files
Fixed typos.
parent
f4244603
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/setup_stochastic_perfect_foresight_model_solver.m
View file @
e84b8de4
...
@@ -3,7 +3,7 @@ function pfm = setup_stochastic_perfect_foresight_model_solver(DynareModel,Dynar
...
@@ -3,7 +3,7 @@ function pfm = setup_stochastic_perfect_foresight_model_solver(DynareModel,Dynar
pfm
.
lead_lag_incidence
=
DynareModel
.
lead_lag_incidence
;
pfm
.
lead_lag_incidence
=
DynareModel
.
lead_lag_incidence
;
pfm
.
ny
=
DynareModel
.
endo_nbr
;
pfm
.
ny
=
DynareModel
.
endo_nbr
;
pfm
.
Sigma
=
DynareModel
.
Sigma_e
;
pfm
.
Sigma
=
DynareModel
.
Sigma_e
;
pfm
.
o
mega
=
chol
(
pfm
.
Sigma
,
'upper'
);
% Sigma = Omega'*Omega
pfm
.
O
mega
=
chol
(
pfm
.
Sigma
,
'upper'
);
% Sigma = Omega'*Omega
pfm
.
number_of_shocks
=
length
(
pfm
.
Sigma
);
pfm
.
number_of_shocks
=
length
(
pfm
.
Sigma
);
pfm
.
stochastic_order
=
DynareOptions
.
ep
.
stochastic
.
order
;
pfm
.
stochastic_order
=
DynareOptions
.
ep
.
stochastic
.
order
;
pfm
.
max_lag
=
DynareModel
.
maximum_endo_lag
;
pfm
.
max_lag
=
DynareModel
.
maximum_endo_lag
;
...
@@ -61,7 +61,7 @@ if nargin>3
...
@@ -61,7 +61,7 @@ if nargin>3
% Replicate the univariate nodes for each innovation and dates, and, if needed, correlate them.
% Replicate the univariate nodes for each innovation and dates, and, if needed, correlate them.
nodes
=
repmat
(
nodes
,
1
,
pfm
.
number_of_shocks
*
pfm
.
stochastic_order
)
*
kron
(
eye
(
pfm
.
stochastic_order
),
pfm
.
Omega
);
nodes
=
repmat
(
nodes
,
1
,
pfm
.
number_of_shocks
*
pfm
.
stochastic_order
)
*
kron
(
eye
(
pfm
.
stochastic_order
),
pfm
.
Omega
);
% Put the nodes and weights in cells
% Put the nodes and weights in cells
for
i
=
1
:
number_of_shocks
for
i
=
1
:
pfm
.
number_of_shocks
rr
(
i
)
=
{
nodes
(:,
i
)};
rr
(
i
)
=
{
nodes
(:,
i
)};
ww
(
i
)
=
{
weights
};
ww
(
i
)
=
{
weights
};
end
end
...
...
Write
Preview
Supports
Markdown
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