As originally written, the check for complete disagreement had two issues:
(1) It assumed that responses less than 2 were disagreement,
which may not be the case depending on C; and
(2) If no rows were found that needed to be removed,
the check would actually remove all rows, resulting in an error.
This commit fixes both of these issues.
Rather than using 2 as the first response option that is not disagree,
it uses ceiling(C/2), which should be either the middle/neutral category,
or in the case of even C, the first agree category.
If no problematic rows are found, it skips the row removal step.
As originally written, the check for complete disagreement had two issues: (1) It assumed that responses less than 2 were disagreement, which may not be the case depending on C; and (2) If no rows were found that needed to be removed, the check would actually remove all rows, resulting in an error. This commit fixes both of these issues.
Rather than using 2 as the first response option that is not disagree, it uses ceiling(C/2), which should be either the middle/neutral category, or in the case of even C, the first agree category.
If no problematic rows are found, it skips the row removal step.