0
$\begingroup$

I'm just starting out in statistics and my textbook has given me some confusion. I'm currently working on basic linear regression with bivariate data.

Going by the textbook residuals were determined from N-point moving averages. Also the regression line was taken from the N-point moving averages.

Later on in the chapter however residuals were taken directly from the line of best fit. It is unclear whether this regression line was determined from the original data points or from moving averages.

So to sum it all up, 1) Can residuals be determined from moving averages or are they strictly from the regression line? 2) Can the regression line be determined from the moving averages or only from the original data points?

Having a look through google it looks like the regression line and residuals are taken from the raw data, so I'm unsure why the textbook uses moving averages.

Edit: After looking through the wiki mentioned below I see that the least squares regression line and residuals are derived from the raw data. Not sure what my textbook is going for, maybe using the moving averages instead of the raw data saves time since there are less data points to consider.

$\endgroup$
  • $\begingroup$ Moving average implies some sort of time series. Was the first case a time series? But, yes, the usual way to get residiuals in OLS regression has nothing to do with moving averages. $\endgroup$ – Peter Flom Mar 11 '18 at 14:02
  • $\begingroup$ Yes, you are correct. All the work I've done so far involves "something" over a period of time. $\endgroup$ – IceCreamKimi Mar 11 '18 at 22:44
0
$\begingroup$

1) Can residuals be determined from moving averages or are they strictly from the regression line? 2) Can the regression line be determined from the moving averages or only from the original data points?

The moving averages tell you nothing about the covariate or the dependence between the outcome and covariate. You will need this to estimate the slope and the residuals. See Wiki on simple linear regression.

Also the regression line was taken from the N-point moving averages.

I do not know you would do this. Did they do moving averages of both the outcomes and the covariates?

$\endgroup$
  • $\begingroup$ I haven't encountered the term covariates yet. The examples given in the book give the raw data, ask the reader to do n-point moving averages and then determine the least squares regression line from the moving averages. At this stage the equation for the line comes from putting the values in a calculator. Also, the reader is told to get the residuals from the moving averages and to use these either with the regression line for extrapolation or to deseasonalize the raw data. $\endgroup$ – IceCreamKimi Mar 11 '18 at 9:48
  • $\begingroup$ Just to clarify, the values put into the calculator are time for one list and the moving average figures into a second list. Linear regression is then applied to the two lists. $\endgroup$ – IceCreamKimi Mar 11 '18 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.