Ignore extra samples in reported nruns

This commit is contained in:
Miroslav Lichvar 2011-04-18 12:36:02 +02:00
parent 165e6805ab
commit 70735d8d79

View file

@ -299,6 +299,10 @@ RGR_FindBestRegression
nruns = n_runs_from_residuals(resid, n - resid_start); nruns = n_runs_from_residuals(resid, n - resid_start);
if (nruns > critical_runs[n - resid_start] || n - start <= MIN_SAMPLES_FOR_REGRESS) { if (nruns > critical_runs[n - resid_start] || n - start <= MIN_SAMPLES_FOR_REGRESS) {
if (resid_start < 0) {
/* Ignore extra samples in returned nruns */
nruns = n_runs_from_residuals(resid - resid_start, n);
}
break; break;
} else { } else {
/* Try dropping one sample at a time until the runs test passes. */ /* Try dropping one sample at a time until the runs test passes. */