[R] forecasting a time series

R. Michael Weylandt michael.weylandt at gmail.com
Fri Jan 20 07:34:05 CET 2012


Can you clarify what exactly you mean by this?

"[N]ow [I] would like to use the last X values to predict tomorrow's
weather. I'm at a loss. All the functions I've come across (like
forecast()) use the series and then forecast from the end point."

It sounds like a prediction to me.

Anyways, I think most methods do allow "new" values for the
independent variables: e.g., the newdata argument to most predict()
methods and the xreg arguments to forecast::forecast(). Do you know
which method you are using?

Hope this helps,

Michael

On Wed, Jan 18, 2012 at 4:17 PM, nhomeier <nhomeier at aer.com> wrote:
> Couldn't find this in the archives. I'm fitting a series of historical
> weather-related data, but would like to use the latest values to forecast.
> So let's say that I'm using 1970-2000 to fit a model (using fourier terms
> and arima/auto.arima), but now would like to use the last X values to
> predict tomorrow's weather. I'm at a loss. All the functions I've come
> across (like forecast()) use the series and then forecast from the end
> point.
>
> Do I need to decompose the fit and write it out the long way? For example,
> Tomorrow = fit$coef[1]*Yesterday + fit$coef[2]*BeforeYesterday + etc
>
> or is there a function that I'm not finding?
>
> Thank you,
> Nicole
>
> --
> View this message in context: http://r.789695.n4.nabble.com/forecasting-a-time-series-tp4308147p4308147.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list