<p>The <code>res_var</code> attribute of the <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.odr.Output.html" rel="noreferrer"><code>Output</code></a> is the so-called reduced Chi-square value for the fit, a popular choice of goodness-of-fit statistic. <a href="http://arxiv.org/abs/1012.3754" rel="noreferrer">It is somewhat problematic</a> for non-linear fitting, though. You can look at the residuals directly (<code>out.delta</code> for the <code>X</code> residuals and <code>out.eps</code> for the <code>Y</code> residuals). Implementing a cross-validation or bootstrap method for determining goodness-of-fit, as suggested in the linked paper, is left as an exercise for the reader.</p>
How to estimate goodness-of-fit using scipy.odr?
<p>I am fitting data with weights using scipy.odr but I don't know how to obtain a measure of goodness-of-fit or an R squared. Does anyone have suggestions for how to obtain this measure using the output stored by the function?</p>