ZeroDivisionError from passingbablok()
cyrill-r opened this issue · 1 comments
cyrill-r commented
Dear William
Thanks a lot for this great project. While evaluating your package I kept getting ZeroDivisionErrors with certain datasets. I do believe there is an error in the _passingbablok function in regression.py, line 268: self.slope = self.sv[int((n + 1) / k + 2)]
According to "Passing H and Bablok W. J Clin Chem Clin Biochem, vol. 21, no. 11, 1983, pp. 709 - 720", page 712, I would suggest to change that line to: self.slope = self.sv[int((n + 1) / 2 + k)]
Best regards
Cyrill
wptmdoorn commented