Passing Bablok plot reference line
nf260 opened this issue · 1 comments
nf260 commented
Hi
Just discovered this package while searching for Passing Bablok implementations in Python - looks like an amazing resource!
I have tried out the Passing Bablok fit with my data but I am getting some odd results for the reference/identity line.
Here is the data I am working with.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
df = pd.read_csv('data.csv')
from methcomp.regression import passingbablok
plt.figure(figsize=(8,6),dpi=200)
passingbablok(method1 = df['method1'],
method2= df['method2'])
It looks like the reference line goes right through my data.
However, this was not what I was expecting! If I add a reference line manually then this affects the reference line plotted by passingbablok
, which overlaps with the reference line I have plotted and now it is more obvious that method 2 has a slight positive bias.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
df = pd.read_csv('data.csv')
from methcomp.regression import passingbablok
plt.figure(figsize=(8,6),dpi=200)
passingbablok(method1 = df['method1'],
method2= df['method2'])
X_plot = np.linspace(3, 14, 100)
Y_plot = X_plot
plt.plot(X_plot, Y_plot, color='black',linestyle='dotted')