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
Minje Jeon
dynare
Commits
3d5601ca
Commit
3d5601ca
authored
Jul 22, 2021
by
Johannes Pfeifer
Browse files
check_model.m: fix logic of check for non-contemporaneous variables and remove redundant checks
Closes
Dynare/dynare#1792
parent
41814bec
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/check_model.m
View file @
3d5601ca
...
...
@@ -17,19 +17,8 @@ function check_model(DynareModel)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
xlen
=
DynareModel
.
maximum_exo_lag
+
DynareModel
.
maximum_exo_lead
+
1
;
if
~
DynareModel
.
lead_lag_incidence
(
DynareModel
.
maximum_lag
+
1
,:)
>
0
error
(
'RESOL: Error in model specification: some variables don"t appear as current'
)
;
end
if
xlen
>
1
error
([
'RESOL: stochastic exogenous variables must appear only at the'
...
' current period. Use additional endogenous variables'
])
;
end
if
(
DynareModel
.
exo_det_nbr
>
0
)
&&
(
DynareModel
.
maximum_lag
>
1
||
DynareModel
.
maximum_lead
>
1
)
error
([
'Exogenous deterministic variables are currently only allowed in'
...
' models with leads and lags on only one period'
])
if
~
all
(
DynareModel
.
lead_lag_incidence
(
DynareModel
.
maximum_lag
+
1
,:)
>
0
)
warning
(
'Problem in the model specification: some variables don
''
t appear as current. Check whether this is desired.'
);
end
if
~
check_consistency_covariances
(
DynareModel
.
Sigma_e
)
...
...
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