[SciPy-User] obtaining residuals from linear regression?
Fri Aug 26 11:06:19 CDT 2011
I'm new to scipy, and hope the answer is not trivial. I've searched the
archives, googled, and looked at documentation for linalg.lstsq()
numpy.polyfit(), and scipy.stats.linregress(), but it has not answered my
my goal is to linearly adjust a set of observations (Y) for nuisance
variables (X1 ... Xn), so I can use the adjusted Y values in further
computations. One way to achieve what I want is to do a linear regression,
regressing out the nuisance variables, and saving the residuals (being the
part of Y that's not explained by X).
I see the option full=True returns residuals, but its the sum of the
residuals, whereas I am after the actual residuals on a case by case basis.
is there an option to get the raw residuals? it would save me computing them
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User