I've fit a model with lm(), and I now want to analyze it to see where it's overfit, etc... I'm imagining a plot that has the index of each observation on the x-axis, and the corresponding responses plotted as points on the y-axis. In (vertical) line with each point is a set of colored lines stacked on top of each other. Each vertical, colored line corresponds to a predictor in the model, and it's height is the coefficient on that predictor applied the data point it's in line with.
Is there already a function that does this? I don't want to reinvent the wheel (particularly because parsing the output of lm looks unpleasant).

lmproduces a fixed set of coefficients, so what precisely do you mean by "the coefficient on that predictor applied [to] the data point"? – whuber♦ May 30 '12 at 21:04predictwithtype=termsfor the "contribution" you're talking about, and perhaps look into component-plus-residual plots, which is a more common way to look at these contributions. SeecrPlotsin thecarpackage. – Aaron May 31 '12 at 16:07