+static void
+innovations_update_scale (struct innovations_estimate *est, double *theta,
+ size_t i)
+{
+ double result = 0.0;
+ size_t j;
+ size_t k;
+
+
+ result = est->cov[0];
+ for (j = 0; j < i; j++)
+ {
+ k = i - j;
+ result -= theta[k] * theta[k] * est->scale[j];
+ }
+ est->scale[i] = result;
+}
+