Skip to content
Prev 257204 / 398506 Next

plot and lines with time series data

On Mon, Apr 18, 2011 at 7:20 AM, Fred <jianyun.fred.wu at gmail.com> wrote:
Its hard to tell what did not work without a complete example but try
replacing lm with dyn$lm. Using built in Nile:

library(dyn)
fit.model <- dyn$lm(Nile ~ time(Nile))
plot(Nile)
lines(predict(fit.model))