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
c06a8df8
Commit
c06a8df8
authored
Dec 06, 2013
by
Sébastien Villemot
Browse files
Merge pull request #553 from rattoma/master
Trap the case where only one parameter is estimated and only one non-con...
parents
af2909a3
d969a812
Changes
3
Hide whitespace changes
Inline
Side-by-side
matlab/dynare_identification.m
View file @
c06a8df8
...
...
@@ -207,15 +207,23 @@ else
name_tex
=
[
cellstr
(
M_
.
exo_names_tex
);
cellstr
(
M_
.
param_names_tex
)];
end
skipline
()
disp
([
'==== Identification analysis ===='
]),
skipline
()
if
nparam
<
2
,
options_ident
.
advanced
=
0
;
advanced
=
options_ident
.
advanced
;
disp
(
'There is only one parameter to study for identitification.'
)
disp
(
'The advanced option is re-set to 0.'
)
skipline
()
end
options_ident
=
set_default_option
(
options_ident
,
'max_dim_cova_group'
,
min
([
2
,
nparam
-
1
]));
options_ident
.
max_dim_cova_group
=
min
([
options_ident
.
max_dim_cova_group
,
nparam
-
1
]);
MaxNumberOfBytes
=
options_
.
MaxNumberOfBytes
;
store_options_ident
=
options_ident
;
skipline
()
disp
([
'==== Identification analysis ===='
]),
skipline
()
if
iload
<=
0
,
...
...
matlab/identification_analysis.m
View file @
c06a8df8
...
...
@@ -225,7 +225,11 @@ if info(1)==0,
deltaM
=
deltaM
.*
abs
(
params
'
);
deltaM
(
params
==
0
)
=
deltaM_prior
(
params
==
0
);
quant
=
siJ
.
/
repmat
(
sqrt
(
diag
(
cmm
)),
1
,
nparam
);
siJnorm
=
vnorm
(
quant
)
.*
normaliz1
;
if
size
(
quant
,
1
)
==
1
,
siJnorm
=
abs
(
quant
)
.*
normaliz1
;
else
siJnorm
=
vnorm
(
quant
)
.*
normaliz1
;
end
% siJnorm = vnorm(siJ(inok,:)).*normaliz;
quant
=
[];
% inok = find((abs(TAU)<1.e-8));
...
...
@@ -238,7 +242,11 @@ if info(1)==0,
siH
=
siH
(
iy
,:);
if
~
isempty
(
iy
),
quant
=
siH
.
/
repmat
(
sqrt
(
diag_chh
(
iy
)),
1
,
nparam
);
siHnorm
=
vnorm
(
quant
)
.*
normaliz1
;
if
size
(
quant
,
1
)
==
1
,
siHnorm
=
abs
(
quant
)
.*
normaliz1
;
else
siHnorm
=
vnorm
(
quant
)
.*
normaliz1
;
end
else
siHnorm
=
[];
end
...
...
@@ -254,7 +262,11 @@ if info(1)==0,
siLRE
=
siLRE
(
iy
,:);
if
~
isempty
(
iy
),
quant
=
siLRE
.
/
repmat
(
sqrt
(
diag_clre
(
iy
)),
1
,
np
);
siLREnorm
=
vnorm
(
quant
)
.*
normaliz1
(
offset
+
1
:
end
);
if
size
(
quant
,
1
)
==
1
,
siLREnorm
=
abs
(
quant
)
.*
normaliz1
(
offset
+
1
:
end
);
else
siLREnorm
=
vnorm
(
quant
)
.*
normaliz1
(
offset
+
1
:
end
);
end
else
siLREnorm
=
[];
end
...
...
matlab/identification_checks.m
View file @
c06a8df8
...
...
@@ -45,7 +45,11 @@ function [condJ, ind0, indnoJ, ixnoJ, McoJ, PcoJ, jweak, jweak_pair] = identific
npar
=
size
(
JJ
,
2
);
indnoJ
=
zeros
(
1
,
npar
);
ind1
=
find
(
vnorm
(
JJ
)
>=
eps
);
% take non-zero columns
if
size
(
JJ
,
1
)
>
1
,
ind1
=
find
(
vnorm
(
JJ
)
>=
eps
);
% take non-zero columns
else
ind1
=
find
(
abs
(
JJ
)
>=
eps
);
% take non-zero columns
end
JJ1
=
JJ
(:,
ind1
);
[
eu
,
ee2
,
ee1
]
=
svd
(
JJ1
,
0
);
condJ
=
cond
(
JJ1
);
...
...
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