[R] predicting values into the future

Gabor Grothendieck ggrothendieck at gmail.com
Sun Apr 5 12:02:06 CEST 2009


Try this:

> library(forecast)
> weight <- as.numeric(weight)
> fc <- forecast(weight)
> plot(fc)

With this data it chooses a model with multiplicative error and
trend and no seasonality.


On Sun, Apr 5, 2009 at 2:13 AM, Felipe Carrillo
<mazatlanmexico at yahoo.com> wrote:
>
> Hi:
> I have usually used the GROWTH() excel function to do this but now want to see if I can do this with R.
> I want to predict values into the future, possibly with the predict.arima Function.
> I have the following weekly fish weight averages:
>
> weight <- c("2.1","2.4","2.8","3.6","4.1","5.2","6.3")
> week   <- c("1","2","3","4","5","6","7")
>
> I would like to predict what the weight will be by week 10 based on my weight values and make a line plot of all the weights(including the predicted values). I have two questions:
> 1- Should the predicted values be linear or exponential?
> 2- Is the predict.arima function appropriate to do this?
> Thanks in advance.
>
>
> Felipe D. Carrillo
> Supervisory Fishery Biologist
> Department of the Interior
> US Fish & Wildlife Service
> California, USA
>
> ______________________________________________
> 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