Incorrect calculation of individual standard levels

Issue #1290 resolved
Ghislain Hachey created an issue

This only seems to affect RMI. I believe the standard level (represented as stars) and not correctly calculated. I would expect the following partition lookups for standard evaluations:

  • 0-4: Level 1
  • 5-8: Level 2
  • 9-12: Level 3
  • 13-16: Level 4

Related to this I believe the following partition in the code to be incorrect. This however, does not seem to be used. Only ptSSA and ptEven4 are used as there are nowhere I see that the level for criteria is calculated.

The following also looks suspicious and confusing.

Comments (3)

  1. Ghislain Hachey reporter

    OK, so the reason the below was working with good result for FSM is that the method SSA was not overriden in SSACalculatorRMI which in effect made SSACalculatorRMI nearly identical as SSACalculator. This is also the reason the RMI standard level was miscalculated: it was calculated using the FSM partition scheme and not the even4. Fixing now and clarifying this.

    export class SSACalculatorFactory {
      public static create(survey) {
        switch (survey.version) {
          case "0":
            return new SSACalculatorLegacy(survey);
        }
        switch (survey.country) {
          case "FSM":
            return new SSACalculatorRMI(survey);
        }
        return new SSACalculatorRMI(survey);
      }
    }
    

  2. Log in to comment