Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dynare
Commits
fd7386b5
Commit
fd7386b5
authored
Sep 18, 2012
by
Sébastien Villemot
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'jpfeifer/master'
parents
cba7a3fc
d50e68ef
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
matlab/prior_bounds.m
+2
-2
2 additions, 2 deletions
matlab/prior_bounds.m
matlab/random_walk_metropolis_hastings_core.m
+1
-1
1 addition, 1 deletion
matlab/random_walk_metropolis_hastings_core.m
matlab/set_prior.m
+4
-4
4 additions, 4 deletions
matlab/set_prior.m
with
7 additions
and
7 deletions
matlab/prior_bounds.m
+
2
−
2
View file @
fd7386b5
...
@@ -4,7 +4,7 @@ function bounds = prior_bounds(bayestopt,options)
...
@@ -4,7 +4,7 @@ function bounds = prior_bounds(bayestopt,options)
%!
@deftypefn
{
Function
File
}
{
@var
{
bounds
}
=
}
prior_bounds
(
@var
{
bayesopt
},
@var
{
option
})
%!
@deftypefn
{
Function
File
}
{
@var
{
bounds
}
=
}
prior_bounds
(
@var
{
bayesopt
},
@var
{
option
})
%!
@anchor
{
prior_bounds
}
%!
@anchor
{
prior_bounds
}
%!
@sp
1
%!
@sp
1
%!
Returns
bounds
for
the
prior
densities
.
For
each
estimated
parameter
the
upp
er
and
low
er
bounds
%!
Returns
bounds
for
the
prior
densities
.
For
each
estimated
parameter
the
low
er
and
upp
er
bounds
%!
are
such
that
the
defined
intervals
contains
a
probability
mass
equal
to
1
-
2
*
@var
{
option
}.
prior_trunc
.
The
%!
are
such
that
the
defined
intervals
contains
a
probability
mass
equal
to
1
-
2
*
@var
{
option
}.
prior_trunc
.
The
%!
default
value
for
@var
{
option
}.
prior_trunc
is
1e-10
(
set
in
@ref
{
global_initialization
}).
%!
default
value
for
@var
{
option
}.
prior_trunc
is
1e-10
(
set
in
@ref
{
global_initialization
}).
%!
@sp
2
%!
@sp
2
...
@@ -43,7 +43,7 @@ function bounds = prior_bounds(bayestopt,options)
...
@@ -43,7 +43,7 @@ function bounds = prior_bounds(bayestopt,options)
%
bayestopt
[
structure
]
characterizing
priors
(
shape
,
mean
,
p1
..
p4
)
%
bayestopt
[
structure
]
characterizing
priors
(
shape
,
mean
,
p1
..
p4
)
%
%
%
OUTPUTS
%
OUTPUTS
%
bounds
[
double
]
matrix
specifying
prior
bounds
(
row
=
parameter
,
column
=
upper
&
low
er
bound
)
%
bounds
[
double
]
matrix
specifying
prior
bounds
(
row
=
parameter
,
column
=
lower
&
upp
er
bound
)
%
%
%
SPECIAL
REQUIREMENTS
%
SPECIAL
REQUIREMENTS
%
none
%
none
...
...
This diff is collapsed.
Click to expand it.
matlab/random_walk_metropolis_hastings_core.m
+
1
−
1
View file @
fd7386b5
...
@@ -118,7 +118,7 @@ end
...
@@ -118,7 +118,7 @@ end
%%%%
%%%%
if
any
(
isnan
(
bayestopt_
.
jscale
))
if
any
(
isnan
(
bayestopt_
.
jscale
))
||
(
options_
.
mode_compute
==
0
&&
~
isempty
(
options_
.
mode_file
))
if
exist
([
ModelName
'_optimal_mh_scale_parameter.mat'
])
% This file is created by mode_compute=6.
if
exist
([
ModelName
'_optimal_mh_scale_parameter.mat'
])
% This file is created by mode_compute=6.
load
([
ModelName
'_optimal_mh_scale_parameter'
])
load
([
ModelName
'_optimal_mh_scale_parameter'
])
proposal_covariance_Cholesky_decomposition
=
d
*
Scale
;
proposal_covariance_Cholesky_decomposition
=
d
*
Scale
;
...
...
This diff is collapsed.
Click to expand it.
matlab/set_prior.m
+
4
−
4
View file @
fd7386b5
...
@@ -106,9 +106,9 @@ if ncx
...
@@ -106,9 +106,9 @@ if ncx
bayestopt_
.
p3
=
[
bayestopt_
.
p3
;
estim_params_
.
corrx
(:,
9
)];
bayestopt_
.
p3
=
[
bayestopt_
.
p3
;
estim_params_
.
corrx
(:,
9
)];
bayestopt_
.
p4
=
[
bayestopt_
.
p4
;
estim_params_
.
corrx
(:,
10
)];
bayestopt_
.
p4
=
[
bayestopt_
.
p4
;
estim_params_
.
corrx
(:,
10
)];
bayestopt_
.
jscale
=
[
bayestopt_
.
jscale
;
estim_params_
.
corrx
(:,
11
)];
bayestopt_
.
jscale
=
[
bayestopt_
.
jscale
;
estim_params_
.
corrx
(:,
11
)];
bayestopt_
.
name
=
[
bayestopt_
.
name
;
cellstr
([
'corr '
...
bayestopt_
.
name
=
[
bayestopt_
.
name
;
cellstr
([
repmat
(
'corr '
,
ncx
,
1
)
...
deblank
(
M_
.
exo_names
(
estim_params_
.
corrx
(:,
1
),:))
...
deblank
(
M_
.
exo_names
(
estim_params_
.
corrx
(:,
1
),:))
...
', '
,
deblank
(
M_
.
exo_names
(
estim_params_
.
corrx
(:,
2
),:))])];
repmat
(
', '
,
ncx
,
1
)
,
deblank
(
M_
.
exo_names
(
estim_params_
.
corrx
(:,
2
),:))])];
end
end
if
ncn
if
ncn
if
isequal
(
M_
.
H
,
0
)
if
isequal
(
M_
.
H
,
0
)
...
@@ -124,9 +124,9 @@ if ncn
...
@@ -124,9 +124,9 @@ if ncn
bayestopt_
.
p3
=
[
bayestopt_
.
p3
;
estim_params_
.
corrn
(:,
9
)];
bayestopt_
.
p3
=
[
bayestopt_
.
p3
;
estim_params_
.
corrn
(:,
9
)];
bayestopt_
.
p4
=
[
bayestopt_
.
p4
;
estim_params_
.
corrn
(:,
10
)];
bayestopt_
.
p4
=
[
bayestopt_
.
p4
;
estim_params_
.
corrn
(:,
10
)];
bayestopt_
.
jscale
=
[
bayestopt_
.
jscale
;
estim_params_
.
corrn
(:,
11
)];
bayestopt_
.
jscale
=
[
bayestopt_
.
jscale
;
estim_params_
.
corrn
(:,
11
)];
bayestopt_
.
name
=
[
bayest
i
opt_
.
name
;
cellstr
([
'corr '
...
bayestopt_
.
name
=
[
bayestopt_
.
name
;
cellstr
([
repmat
(
'corr '
,
ncn
,
1
)
...
deblank
(
M_
.
exo_names
(
estim_params_
.
corrn
(:,
1
),:))
...
deblank
(
M_
.
exo_names
(
estim_params_
.
corrn
(:,
1
),:))
...
', '
,
deblank
(
M_
.
exo_names
(
estim_params_
.
corrn
(:,
2
),:))])];
repmat
(
', '
,
ncn
,
1
)
,
deblank
(
M_
.
exo_names
(
estim_params_
.
corrn
(:,
2
),:))])];
end
end
if
np
if
np
xparam1
=
[
xparam1
;
estim_params_
.
param_vals
(:,
2
)];
xparam1
=
[
xparam1
;
estim_params_
.
param_vals
(:,
2
)];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment