class_docstr: Main class for calculating GageRnR.
docstr: Calculate GageRnR Variances.
docstr_tok: ["Calculate","GageRnR","Variances","."]
code: def calculate_var(self, MS):
      """Calculate GageRnR Variances."""
      Var = dict()
  
      Var[Component.MEASUREMENT] = MS[Component.MEASUREMENT]
      Var[Component.OPERATOR_BY_PART] = (
          MS[Component.OPERATOR_BY_PART] - MS[Component.MEASUREMENT]
      ) / self.parts
      Var[Component.OPERATOR] = (
          MS[Component.OPERATOR] - MS[Component.OPERATOR_BY_PART]
      ) / (self.parts * self.measurements)
      Var[Component.PART] = (
          MS[Component.PART] - MS[Component.OPERATOR_BY_PART]
      ) / (self.operators * self.measurements)
  
      for key in Var:
          if Var[key] < 0:
              Var[key] = 0
  
      Var[Component.TOTAL] = (
          Var[Component.OPERATOR]
          + Var[Component.PART]
          + Var[Component.OPERATOR_BY_PART]
          + Var[Component.MEASUREMENT]
      )
  
      Var[GageRnR.GRR] = (
          Var[Component.MEASUREMENT]
          + Var[Component.OPERATOR]
          + Var[Component.OPERATOR_BY_PART]
      )
  
      return Var
  
imports: from enum import Enum
  import numpy
  import math
  import scipy.stats
label_desc: Use image node_id 8 for calling the GageRnR obj's underlying member method code with example usage: obj.calculate_var(MS) and returns: Var