Estimation of analysis and forecast error variances