If you have missing data in your data frame and want residuals for all
observations, you need to use na.action=na.exclude, not the default
na.omit.
As for lag, its description says
Description:
Compute a lagged version of a time series, shifting the time base
back by a given number
Folks,
I'm most confused in trying to do something that (I thought) out to be
mainstream and straightforward R. :-) Could you please help?
I am doing an ordinary linear regression. My goal is: After a
regression, to make residuals, and make a new variable which is the
lagged residuals (lagged by