Title Time-series forecasting package Package TSprediction September 23, 2010 TSprediction is a simple package that implements prediction methods to forecast the time-series. Version 1.56 Date 2010-08-20 Author Tomasz Bartlomowicz <tomasz.bartlomowicz@ue.wroc.pl> Maintainer Tomasz Bartlomowicz <tomasz.bartlomowicz@ue.wroc.pl> License GPL (>= 2) URL www.r-project.org, http://keii.ue. Repository CRAN R topics documented: addratio........................................... 2 addwinters......................................... 2 allnaive........................................... 3 alltrend........................................... 4 chart............................................. 5 epsmoothing........................................ 6 Holt............................................. 6 MAE............................................ 7 MAPE............................................ 8 ME............................................. 9 movaverage......................................... 9 MPE............................................. 10 MSE............................................. 11 mulratio.......................................... 12 mulwinters......................................... 13 RMSE............................................ 14 Inde 15 1
2 addwinters addratio Function addratio calculates forecasts using additive ratio method Function addratio calculates forecasts using additive ratio method. Function returns vector of forecasts. addratio(, r=4, horizon=4) r horizon length of sezon number of forecasts mulratio addratio=addratio(w, 4, 8) print(addratio) addwinters Function addwinters calculates forecasts using additive Winters model Function addwinters calculates forecasts using additive Winters model. Function returns vector of forecasts. addwinters(, r=4, alfa=0, beta=0, gamma=0, typef="first", types="difference", t
allnaive 3 r alfa beta gamma typef types typec length of sezon (number of forecasts) alfa parameter beta parameter gamma parameter kind of F argument. typef should be one of two values: first or mean kind of S argument. types should be one of two values: difference or zero kind of C argument. typec should be one of two values: ratio or one Holt addwinters=addwinters(w, 4, 0.5, 0.95, 0.2) print(addwinters) allnaive Function allnaive calculates forecasts using naive methods Function allnaive calculates forecasts using naive methods. Functions returns vector of forecasts. allnaive(, model=1, c=0) model c kind of naive method c parameter
4 alltrend Holt naive1=allnaive() print(naive1) alltrend Function alltrend calculates forecasts using trend models Function alltrend calculates forecasts using trend models. Functions returns vector of forecasts. alltrend(, model=1, horizon=3) horizon model forecast s time lead (number of forecasts) kind of analytical model Holt
chart 5 trend1=alltrend() print(trend1) chart Function chart draws data and forecasts on the same plot Function chart draws data and forecasts on the same plot chart(, yy, typec="o", lwd1=2, lwd2=2, col1="dark red", col2="dark blue") yy typec lwd1 lwd2 col1 col2 vector of data vector of forecasts kind of chart forecast s time lead kind of F argument. typef should be one of two values: first or mean kind of S argument. types should be one of two values: difference or zero kind of S argument. types should be one of two values: difference or zero allnaive y=allnaive(, 1) chart(, y)
6 Holt epsmoothing Function epsmoothing calculates forecasts using eponential smoothing model Function epsmoothing calculates forecasts using eponential smoothing model. Function returns vector of forecasts. epsmoothing(, alfa=0) alfa alfa parameter Holt epsmoothing=epsmoothing(, 0.75) print(epsmoothing) Holt Function Holt calculates forecasts using Holt s model Function Holt calculates forecasts using Holt s model. Function returns vector of forecasts. Holt(, alfa=0, beta=0, horizon=3, typef="first", types="difference")
MAE 7 alfa beta horizon typef types alfa parameter beta parameter forecast s time lead kind of F argument. typef should be one of two values: first or mean kind of S argument. types should be one of two values: difference or zero allnaive holt=holt(, 0.3, 0.7, 4) print(holt) MAE Function MAE calculates mean absolute error (MAE) Function MAE calculates mean absolute error (MAE). Function returns vector of errors and value of MAE. MAE(, y) y vector of empirical data vector of forecasts
8 MAPE ME mae=mae(, y) print(mae) MAPE Function MAPE calculates mean absolute percentage error (MAPE) Function MAPE calculates mean absolute percentage error (MAPE). Function returns vector of errors and value of MAPE. MAPE(, y) y vector of empirical data vector of forecasts MPE mape=mape(, y) print(mape)
ME 9 ME Function ME calculates mean error (ME) Function ME calculates mean error (ME). Function returns vector of errors and value of ME. ME(, y) y vector of empirical data vector of forecasts MAE me=me(, y) print(me) movaverage Function movaverage calculates forecasts using moving average method Function movaverage calculates forecasts using moving average method. Function returns vector of forecasts. movaverage(, k=0)
10 MPE k parameter of smoothing Holt movaverage=movaverage(, 3) print(movaverage) MPE Function MPE calculates mean percentage error (MPE) Function MPE calculates mean percentage error (MPE). Function returns vector of errors and value of MPE. MPE(, y) y vector of empirical data vector of forecasts
MSE 11 MAPE mpe=mpe(, y) print(mpe) MSE Function MSE calculates mean squared error (MSE) Function MSE calculates mean squared error (MSE). Function returns vector of errors and value of MSE. MSE(, y) y vector of empirical data vector of forecasts MPE mse=mse(, y) print(mse)
12 mulratio mulratio Function mulratio calculates forecasts using multiplicative ratio method Function mulratio calculates forecasts using multiplicative ratio method. Function returns vector of forecasts. mulratio(, r=4, horizon=4) r horizon length of sezon number of forecasts addratio mulratio=mulratio(w, 4, 8) print(mulratio)
mulwinters 13 mulwinters Function mulwinters calculates forecasts using multiplicative Winters model Function mulwinters calculates forecasts using multiplicative Winters model. Function returns vector of forecasts. mulwinters(, r=4, alfa=0, beta=0, gamma=0, typef="first", types="difference", t r alfa beta gamma typef types typec length of sezon (number of forecasts) alfa parameter beta parameter gamma parameter kind of F argument. typef should be one of two values: first or mean kind of S argument. types should be one of two values: difference or zero kind of C argument. typec should be one of two values: ratio or one Holt mulwinters=mulwinters(w, 4, 0.5, 0.95, 0.2) print(mulwinters)
14 RMSE RMSE Function RMSE calculates root mean squared error (RMSE) Function RMSE calculates root mean squared error (RMSE). Function returns vector of errors and value of RMSE. RMSE(, y) y vector of empirical data vector of forecasts MSE rmse=rmse(, y) print(rmse)
Inde Topic multivariate addratio, 1 addwinters, 2 allnaive, 3 alltrend, 4 chart, 4 epsmoothing, 5 Holt, 6 MAE, 7 MAPE, 8 ME, 8 movaverage, 9 MPE, 10 MSE, 11 mulratio, 11 mulwinters, 12 RMSE, 13 addratio, 1, 12 addwinters, 2 allnaive, 3, 5, 7 alltrend, 4 chart, 4 epsmoothing, 5 Holt, 3, 4, 6, 6, 10, 13 MAE, 7, 9 MAPE, 8, 10 ME, 7, 8 movaverage, 9 MPE, 8, 10, 11 MSE, 11, 13 mulratio, 2, 11 mulwinters, 12 RMSE, 13 15