filter — Kalman filter
[betat,betaf,sigmatt,sigmatf]=filter(param,func,y,x,F,z)
param = a vector of parameters (sqrt of variances)
func = the function which transforms the parameters into the matrix of variances (Q and R) and, if necessary, into the matrices of prior values
y = (nx1) data vector
x = (nxk) data matrix
F = transition matrix
z = (nxl) data matrix
betat = vector of filtered beta at date t with the information available at date t (beta(t|t))
betaf = vector of filtered beta at date t with the information available at date t-1 (beta(t|t-1)
ferror = vector of errors at date t (=y-x*beta(t|t))
sigmatt = vector of filtered variances at date t with the information available at date t (sigma(t|t))
sigmatf = vector of filtered variances at date t with the information available at date t-1 (sigma(t|t-1))