- est->variance = 0.0;
- est->cov = xnmalloc (lag, sizeof (*est->cov));
- est->scale = xnmalloc (lag, sizeof (*est->scale));
- est->coeff = xnmalloc (lag, sizeof (*est->coeff));
- est->max_lag = (double) lag;
- /* COV does not the variance (i.e., the lag 0 covariance). So COV[0]
- holds the lag 1 covariance, COV[i] holds the lag i+1 covariance. */
+ /* COV[0] stores the lag 0 covariance (i.e., the variance), COV[1]
+ holds the lag-1 covariance, etc.
+ */
+ est->cov = xnmalloc (lag + 1, sizeof (*est->cov));
+ est->scale = xnmalloc (lag + 1, sizeof (*est->scale));
+ est->coeff = xnmalloc (lag, sizeof (*est->coeff)); /* No intercept. */
+
+ /*
+ The loop below is an unusual use of PSPP_COEFF_INIT(). In a
+ typical model, one column of a DESIGN_MATRIX has one
+ coefficient. But in a time-series model, one column has many
+ coefficients.
+ */