KF
Evaluate a state space TSmodel
Description
Evaluate a state space TSmodel.
Usage
KF( model, data, sampleT=NULL, predictT=NULL,
return.state=F, return.track=F,result=NULL, fortran=T)
Required Arguments
- model
-
An object of class 'SS' 'TSmodel'.
- data
-
A list containing input and output data. See TSdata.
- sampleT
-
An integer indicating the last data point to use for one step ahead filter
estimation. If NULL all available data is used.
- predictT
-
An integer indicating how far past the end of the sample predictions should
be made. For models with an input, input data must be provided up to predictT.
Output data is necessary only to sampleT. If NULL predictT is set to sampleT.
- return.state
-
If T the element $filter$state containing E[z(t)|y(t-1), u(t)] is returned as
part of the result. This can be a fairly large matrix.
- return.track
-
If T the element $filter$track containing the expectation of the tracking
error given y(t-1) and u(t) is returned as part of the result. This can be an
very large array.
- result
-
If result is not specified an object of class TSestModel is
returned. Otherwise, the specified element of TSestModel$estimates
is returned.
- fortran
-
If T the fortran version of the code is used. Otherwise the S version is used.
- warn
-
If FALSE then certain warning messages are turned off.
Value
Usually an object of class TSestModel (see TSestModel), but see result above.
SEE
See documentation for function l() for more details.
Details
This function is called by the function l() when the argument to l is a state
space model. Using l() is usually preferable to calling KF directly.
KF calls a fortran program unless fortran=F. The fortran version is much faster
than the S version.
See Also
Examples
return to Table of Contents