'Implements the Kalman Filter recursions. Optimized for univariate case.'

def _univariatefilter(self, params, init_state, init_var):

    y = self.endog
    nobs = self.nobs
    R = self.R
    T = self.T
    Z = self.Z
    H = self.H
    Q = self.Q
    if ((not init_state) and (not init_var)):
        (alpha, P) = _init_diffuse(T, R)
