Skip to content

Modeling the trend and eliminate it

2 messages · Poizot Emmanuel, Roger D. Peng

#
Hi,
I would like to eliminate the trend of a set localised (with x an  y) data.
I try to fit a linear model to the data:
mod.01 <- lm(ff~x+y)
I've got so a model. My question is how can I do to subtract the model from 
the initial f data ?
#
residuals(mod.01)

or maybe

ff - fitted(mod.01)

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng
On Tue, 8 Apr 2003, Poizot Emmanuel wrote: