//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET: //ORIGINAL LINE: private static double[] applyYuleWalkerAndGetInitialErrors(final double[] data, final int r, final int length, final double[] errors) private static double[] applyYuleWalkerAndGetInitialErrors(double[] data, int r, int length, double[] errors) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final double[] yuleWalker = YuleWalker.fit(data, r); double[] yuleWalker = YuleWalker.fit(data, r); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final TimeSeries.Forecast.TimeSeries.Arima.struct.BackShift bsYuleWalker = new TimeSeries.Forecast.TimeSeries.Arima.struct.BackShift(r, true); BackShift bsYuleWalker = new BackShift(r, true); bsYuleWalker.initializeParams(false); // return array from YuleWalker is an array of size r whose // 0-th index element is lag 1 coefficient etc // hence shifting lag index by one and copy over to BackShift operator for (int j = 0; j < r; ++j) { bsYuleWalker.setParam(j + 1, yuleWalker[j]); } int m = 0; // populate error array while (m < r) { errors[m++] = 0; } // initial r-elements are set to zero while (m < length) { // from then on, initial estimate of error terms are // Z_t = X_t - \phi_1 X_{t-1} - \cdots - \phi_r X_{t-r} errors[m] = data[m] - bsYuleWalker.getLinearCombinationFrom(data, m); ++m; } return(yuleWalker); }