[SciPy-User] obtaining residuals from linear regression?
Fri Aug 26 11:29:28 CDT 2011
On Fri, Aug 26, 2011 at 12:06 PM, Jeremy Gray <email@example.com> wrote:
> 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
for a full answer for the linear (in parameter) case
> SciPy-User mailing list
More information about the SciPy-User