114 lines
6.2 KiB
HTML
114 lines
6.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Description of kalman_filter</title>
|
|
<meta name="keywords" content="kalman_filter">
|
|
<meta name="description" content="SYNOPSIS">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="generator" content="m2html © 2003 Guillaume Flandin">
|
|
<meta name="robots" content="index, follow">
|
|
<link type="text/css" rel="stylesheet" href="../m2html.css">
|
|
</head>
|
|
<body>
|
|
<a name="_top"></a>
|
|
<div><a href="../index.html">Home</a> > <a href="index.html">.</a> > kalman_filter.m</div>
|
|
|
|
<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td>
|
|
<td align="right"><a href="index.html">Index for . <img alt=">" border="0" src="../right.png"></a></td></tr></table>-->
|
|
|
|
<h1>kalman_filter
|
|
<img src="../{MEXTYPE}.png" alt="Linux x86" border="0" title="Linux x86"></h1>
|
|
|
|
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="box"><strong>SYNOPSIS</strong></div>
|
|
|
|
<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="box"><strong>function [loglik, per, d] = kalman_filter(varargin) </strong></div>
|
|
|
|
<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="fragment"><pre class="comment">
|
|
SYNOPSIS
|
|
|
|
[loglik,per,d] = kalman_filter(Z,H,T,R,Q,Y,a,P)
|
|
[loglik,per,d] = kalman_filter(Z,H,T,R,Q,Y,a,P,flag)
|
|
[loglik,per,d] = kalman_filter(Z,H,T,R,Q,Y,a,Pstar,Pinf)
|
|
[loglik,per,d] = kalman_filter(Z,H,T,R,Q,Y,a,Pstar,Pinf,flag)
|
|
|
|
SEMANTICS
|
|
|
|
The first two commands run a Kalman filter for non-diffuse
|
|
initial conditions, the other two for diffuse initial conditions.
|
|
|
|
Input:
|
|
Z,H,T,R,Q gives a state space form
|
|
Y observed data (columns correspond to periods)
|
|
a mean of initial state
|
|
P covariance of initial non-diffuse state
|
|
Pstar finite part of covariance of initial diffuse state
|
|
Pinf infinite part of covariance of initial diffuse state
|
|
flag string starting with 'u', or 'U' runs a univariate
|
|
form of the filter; if omitted, a multivariate version
|
|
is run by default
|
|
|
|
Output:
|
|
loglik data log likelihood
|
|
per number of succesfully filtered periods; if no error
|
|
then per equals to the number of columns of Y
|
|
d number of initial periods for which the state is
|
|
still diffuse (d is always 0 for non-diffuse case)
|
|
|
|
Copyright 2005, Ondra Kamenik</pre></div>
|
|
|
|
<!-- crossreference -->
|
|
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
This function calls:
|
|
<ul style="list-style-image:url(../matlabicon.gif)">
|
|
</ul>
|
|
This function is called by:
|
|
<ul style="list-style-image:url(../matlabicon.gif)">
|
|
<li><a href="DsgeLikelihood.html" class="code" title="function [fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data)">DsgeLikelihood</a> stephane.adjemian@cepremap.cnrs.fr [09-07-2004]</li></ul>
|
|
<!-- crossreference -->
|
|
|
|
|
|
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="fragment"><pre>0001 <span class="comment">%</span>
|
|
0002 <span class="comment">% SYNOPSIS</span>
|
|
0003 <span class="comment">%</span>
|
|
0004 <span class="comment">% [loglik,per,d] = kalman_filter(Z,H,T,R,Q,Y,a,P)</span>
|
|
0005 <span class="comment">% [loglik,per,d] = kalman_filter(Z,H,T,R,Q,Y,a,P,flag)</span>
|
|
0006 <span class="comment">% [loglik,per,d] = kalman_filter(Z,H,T,R,Q,Y,a,Pstar,Pinf)</span>
|
|
0007 <span class="comment">% [loglik,per,d] = kalman_filter(Z,H,T,R,Q,Y,a,Pstar,Pinf,flag)</span>
|
|
0008 <span class="comment">%</span>
|
|
0009 <span class="comment">% SEMANTICS</span>
|
|
0010 <span class="comment">%</span>
|
|
0011 <span class="comment">% The first two commands run a Kalman filter for non-diffuse</span>
|
|
0012 <span class="comment">% initial conditions, the other two for diffuse initial conditions.</span>
|
|
0013 <span class="comment">%</span>
|
|
0014 <span class="comment">% Input:</span>
|
|
0015 <span class="comment">% Z,H,T,R,Q gives a state space form</span>
|
|
0016 <span class="comment">% Y observed data (columns correspond to periods)</span>
|
|
0017 <span class="comment">% a mean of initial state</span>
|
|
0018 <span class="comment">% P covariance of initial non-diffuse state</span>
|
|
0019 <span class="comment">% Pstar finite part of covariance of initial diffuse state</span>
|
|
0020 <span class="comment">% Pinf infinite part of covariance of initial diffuse state</span>
|
|
0021 <span class="comment">% flag string starting with 'u', or 'U' runs a univariate</span>
|
|
0022 <span class="comment">% form of the filter; if omitted, a multivariate version</span>
|
|
0023 <span class="comment">% is run by default</span>
|
|
0024 <span class="comment">%</span>
|
|
0025 <span class="comment">% Output:</span>
|
|
0026 <span class="comment">% loglik data log likelihood</span>
|
|
0027 <span class="comment">% per number of succesfully filtered periods; if no error</span>
|
|
0028 <span class="comment">% then per equals to the number of columns of Y</span>
|
|
0029 <span class="comment">% d number of initial periods for which the state is</span>
|
|
0030 <span class="comment">% still diffuse (d is always 0 for non-diffuse case)</span>
|
|
0031 <span class="comment">%</span>
|
|
0032 <span class="comment">% Copyright 2005, Ondra Kamenik</span>
|
|
0033 <span class="comment">%</span>
|
|
0034
|
|
0035 <a name="_sub0" href="#_subfunctions" class="code">function [loglik, per, d] = kalman_filter(varargin)</a>
|
|
0036
|
|
0037 [loglik, per, d] = kalman_filter_(varargin{:});</pre></div>
|
|
<hr><address>Generated on Fri 16-Jun-2006 09:09:06 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address>
|
|
</body>
|
|
</html> |