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
1df8bf15
Commit
1df8bf15
authored
Mar 18, 2013
by
Johannes Pfeifer
Browse files
Bugfix in rplot + typo correction
parent
4b095c2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
matlab/kalman/likelihood/kalman_filter.m
View file @
1df8bf15
function
[
LIK
,
LIKK
,
a
,
P
]
=
kalman_filter
(
Y
,
start
,
last
,
a
,
P
,
kalman_tol
,
riccati_tol
,
presample
,
T
,
Q
,
R
,
H
,
Z
,
mm
,
pp
,
rr
,
Zflag
,
diffuse_periods
,
analytic_derivation
,
DT
,
DYss
,
DOm
,
DH
,
DP
,
D2T
,
D2Yss
,
D2Om
,
D2H
,
D2P
)
%
Computes
the
likelihood
of
a
station
n
ary
state
space
model
.
%
Computes
the
likelihood
of
a
stationary
state
space
model
.
%
@info
:
%!
@deftypefn
{
Function
File
}
{[
@var
{
LIK
},
@var
{
likk
},
@var
{
a
},
@var
{
P
}
]
=
}
DsgeLikelihood
(
@var
{
Y
},
@var
{
start
},
@var
{
last
},
@var
{
a
},
@var
{
P
},
@var
{
kalman_tol
},
@var
{
riccati_tol
},
@var
{
presample
},
@var
{
T
},
@var
{
Q
},
@var
{
R
},
@var
{
H
},
@var
{
Z
},
@var
{
mm
},
@var
{
pp
},
@var
{
rr
},
@var
{
Zflag
},
@var
{
diffuse_periods
})
...
...
matlab/kalman/likelihood/kalman_filter_d.m
View file @
1df8bf15
...
...
@@ -15,7 +15,7 @@ function [dLIK,dlik,a,Pstar] = kalman_filter_d(Y, start, last, a, Pinf, Pstar, k
% R [double] mm*rr matrix relating the structural innovations to the state vector.
% Q [double] rr*rr covariance matrix of the structural innovations.
% H [double] pp*pp covariance matrix of the measurement errors (if H is equal to zero (scalar) there is no measurement error).
% Z [double] pp*mm matrix, selection matrix or pp linear independ
a
nt combinations of the state vector.
% Z [double] pp*mm matrix, selection matrix or pp linear independ
e
nt combinations of the state vector.
% mm [integer] scalar, number of state variables.
% pp [integer] scalar, number of observed variables.
% rr [integer] scalar, number of structural innovations.
...
...
matlab/rplot.m
View file @
1df8bf15
...
...
@@ -85,10 +85,11 @@ elseif rplottype == 2
subplot
(
nl
,
nc
,
j
)
;
plot
(
ix
(
i
),
y
(
j
,
i
))
;
hold
on
;
plot
(
ix
(
i
),
oo_
.
steady_state
(
j
)
*
ones
(
1
,
size
(
i
,
1
)),
'
w
:'
)
;
plot
(
ix
(
i
),
oo_
.
steady_state
(
strmatch
(
s1
(
j
,:),
M_
.
endo_names
,
'exact'
)
)
*
ones
(
1
,
size
(
i
,
1
)),
'
r
:'
)
;
xlabel
(
'Periods'
)
;
ylabel
([
s1
(
j
,:)],
'Interpreter'
,
'none'
)
;
title
([
'Plot of '
s1
(
j
,:)],
'Interpreter'
,
'none'
)
;
axis
tight
;
end
end
...
...
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