This function is used internally by package robKalman for the rLS filter

1 | ```
.rLScorrstep(y, x1, S1, Z, V, i, rob1=NULL, b, norm=EuclideanNorm, ...)
``` |

`Z` |
observation matrix (see below) |

`V` |
observation error covariance (see below) |

`b` |
clipping height |

`i` |
the time instance |

`norm` |
a function with a numeric vector |

`S1` |
prediction error covariance |

`rob1` |
not used here; included for compatibility reasons; set to |

`y` |
observation |

`x1` |
(rLS Kalman)- predicted state |

`...` |
not used here; for compatibility with signatures of other "step"-functions |

We work in the setup of the linear, Gaussian state space model (l-G-SSM)
with *p* dimensional states *x_t* and *q* dimensional observations *y_t*,
with **initial condition**

*x_0 ~ N_p(a,S),*

**state equation**

*x_t = F_t x_{t-1} + v_t, v_t ~ N_p(0,Q_t), t>=1,*

**observation equation**

*y_t = Z_t x_t + e_t, e_t ~ N_q(0,V_t), t>=1,*

and where all random variable *x_0*, *v_t*, *e_t* are independent.

For notation, let us formulate the classical Kalman filter in this context:

**(0) ininitial step**

*x_{0|0} = a*

*\code{ }* with error covariance

*S_{0|0} = Cov(x_0-x_{0|0}) = S*

**(1) prediction step**

*x_{t|t-1} = F_t x_{t-1|t-1}, t>=1*

*\code{ }* with error covariance

*S_{t|t-1} = Cov(x_t-x_{t|t-1}) = F_t S_{t-1|t-1} F_t' + Q_t*

**(2) correction step**

*x_{t|t} = x_{t|t-1} + K_t (y_t - Z_t x_{t|t-1}), t>=1*

*\code{ }* for Kalman Gain

*K_t = S_{t|t-1} Z_t' (Z_t S_{t|t-1} Z_t' + V_t )^-*

*\code{ }* with error covariance

*S_{t|t} =
Cov(x_t-x_{t|t}) = S_{t|t-1} - K_t Z_t S_{t|t-1}*

`.rLScorrstep(y, x1, S1, Z, V, b)`

calculates rLS-*x_{t|t}* for arguments `b`

, `x1 =`

*x_{t|t-1}* (from rLS-past),
`y =`

*y_{t}*, `S1 =`

*S_{t|t-1}*, `Z`

, and `V`

as above

The return value is a list with components
`x0`

(the filtered values), `K`

(the Kalman gain),
`S0`

(the filter error covariance),
`Delta`

(the covariance of *Delta y_t*),
`DeltaY`

(the observation residuals *Delta y_t*),
`Ind`

(the indicators of clipped runs)

Peter Ruckdeschel Peter.Ruckdeschel@itwm.fraunhofer.de,

Ruckdeschel, P. (2001) *Ans\"atze zur Robustifizierung des
Kalman Filters.* Bayreuther Mathematische Schriften, Vol. 64.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.