Business Analysis

Which R packages are best for time series forecasting in 2024?

L Asked by Linda Martinez · 05-02-2024
0 upvotes 15,748 views 0 comments
The question

I need to build a demand forecasting model for a retail client using historical sales data. In the past, I used the forecast package, but I keep hearing about fable and prophet. Which one should I prioritize learning for professional use in 2024? I need something that handles seasonality, holidays, and produces clear visualization of the predicted intervals. 

3 answers

0
E
Answered on 07-02-2024

The forecast package is a classic, but the "tidyverts" ecosystem (especially the fable package) is the future of time series in R. It follows tidy data principles, making it much easier to handle multiple time series at once using "mables" and "fables." For retail, fable is excellent because it includes ARIMA, ETS, and even neural network models. If you have very messy data with strong holiday effects, Facebook’s prophet is very robust and requires less manual tuning of parameters, though it can sometimes be a bit of a "black box" compared to traditional statistical methods. 

0
WI
Answered on 08-02-2024

Does your retail dataset have a lot of outliers or missing days? Some models like ARIMA can be quite sensitive to gaps in the timeline, whereas prophet handles missing data by design. How much pre-processing have you done?

RI 09-02-2024

William, the data is actually quite clean but very "noisy." I’ve found that using the tsibble package for data prep helps a lot. It forces you to define the time index clearly, which prevents a lot of common errors in forecasting. I'm planning to try a hybrid approach—using prophet for the baseline and then checking it against a damped-trend ETS model in fable to see which has the lower MAE.

0
MA
Answered on 10-02-2024

Don't overlook the timetk package! It’s fantastic for feature engineering and converting time series into a format suitable for machine learning. 

LI 11-02-2024

Good call, Mary. timetk is my go-to for visualizing seasonality and creating lag features before I feed them into an XGBoost model.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

World globe icon Country: Japan

Book Free Session