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
Johannes Pfeifer
dynare
Commits
1e414588
Commit
1e414588
authored
Jun 10, 2010
by
Sébastien Villemot
Browse files
Estimation DLL: bugfixes in LogLikelihoodMain
parent
974e9ac0
Changes
4
Hide whitespace changes
Inline
Side-by-side
mex/sources/estimation/EstimatedParametersDescription.cc
View file @
1e414588
...
...
@@ -34,3 +34,14 @@ EstimatedParametersDescription::EstimatedParametersDescription(std::vector<Estim
{
}
size_t
EstimatedParametersDescription
::
getNumberOfPeriods
()
const
{
size_t
r
=
0
;
for
(
size_t
i
=
0
;
i
<
estSubsamples
.
size
();
i
++
)
{
size_t
r2
=
estSubsamples
[
i
].
endPeriod
+
1
;
if
(
r2
>
r
)
r
=
r2
;
}
}
mex/sources/estimation/EstimatedParametersDescription.hh
View file @
1e414588
...
...
@@ -49,6 +49,7 @@ public:
EstimatedParametersDescription
(
std
::
vector
<
EstimationSubsample
>
&
estSubsamples
,
std
::
vector
<
EstimatedParameter
>
&
estParams
);
std
::
vector
<
EstimationSubsample
>
estSubsamples
;
std
::
vector
<
EstimatedParameter
>
estParams
;
size_t
getNumberOfPeriods
()
const
;
};
#endif // !defined(E8F2C096_A301_42e8_80FF_A643291BF995__INCLUDED_)
mex/sources/estimation/EstimationSubsample.hh
View file @
1e414588
...
...
@@ -53,7 +53,7 @@
* class LogPosteriorDensity on as needed basis and updates all parameters (inc. H
* and Q) when time slot xparam1 is supplied.
*
*
*
Time indices follow C convention: first period has index 0.
*/
class
EstimationSubsample
{
public:
...
...
mex/sources/estimation/LogLikelihoodMain.cc
View file @
1e414588
...
...
@@ -34,8 +34,7 @@ LogLikelihoodMain::LogLikelihoodMain( //const Matrix &data_arg, Vector &deepPara
:
estSubsamples
(
estiParDesc
.
estSubsamples
),
logLikelihoodSubSample
(
dynamicDllFile
,
estiParDesc
,
n_endo
,
n_exo
,
zeta_fwrd_arg
,
zeta_back_arg
,
zeta_mixed_arg
,
zeta_static_arg
,
qz_criterium
,
varobs
,
riccati_tol
,
lyapunov_tol
,
info_arg
),
//deepParams(deepParams_arg),
vll
(
estSubsamples
[
estSubsamples
.
size
()
-
1
].
endPeriod
)
// time dimension size of data
vll
(
estiParDesc
.
getNumberOfPeriods
())
// time dimension size of data
{
...
...
@@ -49,7 +48,7 @@ LogLikelihoodMain::~LogLikelihoodMain()
double
LogLikelihoodMain
::
compute
(
Matrix
&
steadyState
,
const
Vector
&
estParams
,
Vector
&
deepParams
,
const
MatrixConstView
&
data
,
Matrix
&
Q
,
Matrix
&
H
,
size_t
start
,
int
&
info
)
{
for
(
size_t
i
=
1
;
i
<
=
(
size_t
)
estSubsamples
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
estSubsamples
.
size
();
++
i
)
{
VectorView
vSteadyState
=
mat
::
get_col
(
steadyState
,
i
);
...
...
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