Re: [R] plotting least-squares residuals against x-axis

2009-09-20 Thread Schalk Heunis
Jason Try this > Residuals = residuals(lm(y~x)) > plot(x,Residuals) Schalk Heunis On Sun, Sep 20, 2009 at 1:36 AM, Jason Priem wrote: > Hi, > I want to plot the residuals of a least-squares regression. > > plot(lm(y~x), which=1) > > does this, but it plots the y-axis of my data on the x-axis

[R] plotting least-squares residuals against x-axis

2009-09-19 Thread Jason Priem
Hi, I want to plot the residuals of a least-squares regression. plot(lm(y~x), which=1) does this, but it plots the y-axis of my data on the x-axis of the residuals plot. That is, it plots the residual for each y-value in the data. Can I instead use the x-axis of my data as the x-axis of the