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
DynareJulia
Dynare.jl
Commits
4093784b
Commit
4093784b
authored
Apr 17, 2021
by
MichelJuillard
Browse files
simplify variance computation for stationary models
parent
070cc860
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/perturbations.jl
View file @
4093784b
...
...
@@ -129,7 +129,10 @@ function compute_variance!(context)
fill!
(
stationary_variables
,
true
)
state_stationary_variables
=
view
(
stationary_variables
,
m
.
i_bkwrd_b
)
nonstate_stationary_variables
=
view
(
stationary_variables
,
m
.
i_non_states
)
if
any
(
ws
.
nonstationary_variables
)
if
ws
.
stationary_model
state_stationary_nbr
=
m
.
n_states
nonstate_stationary_nbr
=
m
.
endogenous_nbr
-
m
.
n_states
else
fill!
(
Σy
,
NaN
)
state_stationary_variables
.=
.!
ws
.
nonstationary_variables
state_stationary_nbr
=
count
(
state_stationary_variables
)
...
...
@@ -143,9 +146,6 @@ function compute_variance!(context)
end
end
nonstate_stationary_nbr
=
count
(
nonstate_stationary_variables
)
else
state_stationary_nbr
=
m
.
n_states
nonstate_stationary_nbr
=
m
.
endogenous_nbr
-
m
.
n_states
end
# state / state
stationary_nbr
=
state_stationary_nbr
+
nonstate_stationary_nbr
...
...
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