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
6a3e0da5
Commit
6a3e0da5
authored
Dec 10, 2013
by
Sébastien Villemot
Browse files
Merge pull request #559 from rattoma/master
Irf restrictions and identification
parents
f525de04
b3c4f942
Changes
3
Hide whitespace changes
Inline
Side-by-side
matlab/dynare_identification.m
View file @
6a3e0da5
...
...
@@ -334,6 +334,8 @@ if iload <=0,
disp
(
'----------- '
)
skipline
()
return
else
parameters
=
'Random_prior_params'
;
end
else
idehess_point
.
params
=
params
;
...
...
@@ -344,6 +346,7 @@ if iload <=0,
% normJ = max(abs(siJ)')';
% normLRE = max(abs(siLRE)')';
save
([
IdentifDirectoryName
'/'
M_
.
fname
'_identif.mat'
],
'idehess_point'
,
'idemoments_point'
,
'idemodel_point'
,
'idelre_point'
,
'store_options_ident'
)
save
([
IdentifDirectoryName
'/'
M_
.
fname
'_'
parameters
'_identif.mat'
],
'idehess_point'
,
'idemoments_point'
,
'idemodel_point'
,
'idelre_point'
,
'store_options_ident'
)
disp_identification
(
params
,
idemodel_point
,
idemoments_point
,
name
,
advanced
);
if
~
options_
.
nograph
,
plot_identification
(
params
,
idemoments_point
,
idehess_point
,
idemodel_point
,
idelre_point
,
advanced
,
parameters
,
name
,
IdentifDirectoryName
);
...
...
matlab/endogenous_prior_restrictions.m
View file @
6a3e0da5
...
...
@@ -42,11 +42,11 @@ end
infos
=
[
0
0
];
varlist
=
Model
.
endo_names
(
DynareResults
.
dr
.
order_var
,:);
varlist
=
varlist
(
DynareResults
.
dr
.
restrict_var_list
,:);
T
=
1
;
N
T
=
1
;
for
j
=
1
:
size
(
endo_prior_restrictions
.
irf
,
1
),
T
=
max
(
T
,
endo_prior_restrictions
.
irf
{
j
,
3
});
N
T
=
max
(
N
T
,
endo_prior_restrictions
.
irf
{
j
,
3
});
end
for
t
=
1
:
T
,
for
t
=
1
:
N
T
,
RR
=
T
^
(
t
-
1
)
*
R
;
for
j
=
1
:
size
(
endo_prior_restrictions
.
irf
,
1
),
if
endo_prior_restrictions
.
irf
{
j
,
3
}
~=
t
,
...
...
matlab/plot_identification.m
View file @
6a3e0da5
...
...
@@ -153,9 +153,9 @@ if SampleSize == 1,
dyn_saveas
(
hh
,[
IdentifDirectoryName
'/'
M_
.
fname
'_ident_collinearity_'
tittxt1
'_'
int2str
(
j
)
],
options_
);
end
skipline
()
[
U
,
S
,
V
]
=
svd
(
idehess
.
AHess
,
0
);
S
=
diag
(
S
);
if
idehess
.
flag_score
,
[
U
,
S
,
V
]
=
svd
(
idehess
.
AHess
,
0
);
S
=
diag
(
S
);
if
nparam
<
5
,
f1
=
dyn_figure
(
options_
,
'Name'
,[
tittxt
,
' - Identification patterns (Information matrix)'
]);
else
...
...
@@ -163,13 +163,13 @@ if SampleSize == 1,
f2
=
dyn_figure
(
options_
,
'Name'
,[
tittxt
,
' - Identification patterns (Information matrix): HIGHEST SV'
]);
end
else
S
=
idemoments
.
S
;
V
=
idemoments
.
V
;
%
S = idemoments.S;
%
V = idemoments.V;
if
nparam
<
5
,
f1
=
dyn_figure
(
options_
,
'Name'
,[
tittxt
,
' - Identification patterns (moments)'
]);
f1
=
dyn_figure
(
options_
,
'Name'
,[
tittxt
,
' - Identification patterns (moments
Information matrix
)'
]);
else
f1
=
dyn_figure
(
options_
,
'Name'
,[
tittxt
,
' - Identification patterns (moments): SMALLEST SV'
]);
f2
=
dyn_figure
(
options_
,
'Name'
,[
tittxt
,
' - Identification patterns (moments): HIGHEST SV'
]);
f1
=
dyn_figure
(
options_
,
'Name'
,[
tittxt
,
' - Identification patterns (moments
Information matrix
): SMALLEST SV'
]);
f2
=
dyn_figure
(
options_
,
'Name'
,[
tittxt
,
' - Identification patterns (moments
Information matrix
): HIGHEST SV'
]);
end
end
for
j
=
1
:
min
(
nparam
,
8
),
...
...
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