I am using orthogonal distance regression method(scipy.odr) to fit my data, after fit, I have trouble in calculate the 95% confidence interval, please help me no how to calculate it~
here the code:
#define fit function
def def f(p,x):
return p*x
linear = scipy.odr.Model(f)
mydata = scipy.odr.RealData(x, y, sx=dx, sy=dy)
myodr = scipy.odr.ODR(mydata, linear, beta0=[1.])
myoutput = myodr.run()
myoutput.pprint()
[solpe] = myoutput.beta
now I get solpe, get the fitted function: y=p*x,but how should I get 95% confidence interval?