rk.forecast: Business Forecasting and Time Series for RKWard

A Zero-Code GUI Wrapper for the forecast Package Bringing Business Analytics to RKWard

rk.forecast bridges the gap between advanced econometric tools and practical Business Analytics. Designed with modern forecasting workflows in mind (aligning with leading business analytics textbooks), this plugin provides a seamless, point-and-click interface to generate time series predictions, evaluate business KPIs (like MAPE and RMSE), and plot publication-ready graphics using ggplot2—all without writing a single line of R code.


🌟 Key Features


What's New in Version 0.0.2

What's New in Version 0.0.1


⚙️ Prerequisites

You must have RKWard installed along with the following R packages. The plugin will automatically attempt to load them when required:

install.packages(c("forecast", "ggplot2"))

🚀 Installation

You can install this plugin directly from GitHub using remotes or devtools inside your RKWard console:

# Install the plugin
library("remotes")
# install_github("AlfCano/rk.forecast")
install.packages("rk.forecast", repos = c('https://alfcano.r-universe.dev', 'https://cloud.r-project.org'))

Once installed, restart RKWard to ensure the new menu entries and translations appear correctly.


🛠️ Usage Workflow

This plugin adds three essential components under the Analysis > Time Series menu in RKWard:

1. Exponential Smoothing (Holt-Winters)

The core tool for predicting data with trends and seasonality.

2. Baseline Models (Naive & Mean)

Create benchmark models to prove your advanced algorithms are working.

3. Evaluate Accuracy (MAPE, RMSE)

Extract business KPIs from any forecast object in your workspace.


📊 Real-World Case Study: Beating the Baseline

To see the true power of rk.forecast in a Business Analytics context (such as the methodologies taught in Jaggia's Business Analytics textbook), let's predict airline ticket demand and prove our model's worth.

Step 1: Prepare the Data

Open the R Console (bottom panel in RKWard) and paste this code to create a standard data frame mimicking a spreadsheet import:

demand_data <- data.frame(ticket_sales = as.numeric(AirPassengers))

Step 2: Fit an Advanced Model (Holt-Winters)

Go to Analysis > Time Series > Exponential Smoothing (Holt-Winters).

  1. Data & Structure: Select demand_data as the Data Frame and ticket_sales as the Target. Set Frequency to Monthly (12), Start Year to 1949, and Start Period to 1.
  2. Model Selection: Leave "Auto-detect best model (ETS)" checked, and set periods to forecast (h) to 24 (two years).
  3. Click Submit.

What to look for in the HTML Output:

Step 3: Establish a Business Benchmark

Can our complex model beat a simple, naive assumption? Let's create a baseline. Go to Analysis > Time Series > Baseline Models (Naive & Mean).

  1. Input the same data structure as above.
  2. In Model Configuration, select Seasonal Naive. (Business translation: "Our forecast for next January is exactly what we sold this January").
  3. Set periods (h) to 24, ensure "Save forecast object" is active, and hit Submit. Notice how "blocky" and highly uncertain the baseline plot looks compared to our ETS model.

Step 4: The "Pitch" (Evaluate & Communicate)

Now comes the "Communicating with Numbers" phase. Let's evaluate both models professionally. Go to Analysis > Time Series > Evaluate Accuracy (MAPE, RMSE).

  1. Put your benchmark (naive_forecast) into the Model to Evaluate slot, choose the "Minimal" theme, and hit Submit. Look at the MAPE: ~9.9%.
  2. Swap the model for your advanced one (my_forecast) and hit Submit. Look at the MAPE: ~2.77%.

Step 5: The Analyst's Conclusion

Using the HTML reports generated by the plugin, you can now write a data-backed business conclusion:

"Visual analysis confirms an excellent fit for the multiplicative trend. While our traditional baseline strategy (Seasonal Naive) yielded a Mean Absolute Percentage Error (MAPE) of 9.9%, implementing advanced exponential smoothing (ETS) drastically reduced our error rate to just 2.77%. Therefore, the deployment of this statistical model is highly justified, as it reduces our inventory and sales uncertainty by over 7% compared to basic planning."


🌍 Internationalization (i18n)

The graphical interface automatically adapts to your RKWard language settings. Currently supported languages:


📝 License and Author

Author: Alfonso Cano (@AlfCano)
Email: alfonso.cano@correo.buap.mx

This project is licensed under the GPL (>= 3) License.