wptmdoorn/methcomp

ZeroDivisionError from passingbablok()

cyrill-r opened this issue · 1 comments

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

Hi @cyrill-r

Thank you for pinpointing such a specific error. My apologies for the late response. I've addresses this issue in the recent commit: d432fcf.

I will close the issue for now, please contact me if this did not completely answer your question.

Thanks a lot.

All the best, William