baseline | R Documentation |
This function enables to generate a baseline based on historical sales data and to plot the resulting graph. It eliminates the role of external impactors that have a significant effect on the sales to obtain a smooth baseline.
baseline(sales_data, promo_done = FALSE, sizeroll = 11, smoother = "mean", showgraph = FALSE)
sales_data |
A vector containing historical sales data |
promo_done |
A logical variable specifying if promotions are done for the product. |
sizeroll |
An odd integer that determines the width of the rolling median and rolling average to take. |
smoother |
The smoother that should be considered. It can be "mean", "median" or "loess". |
showgraph |
A logical value. If TRUE, returns the graph obtained from the analysis. |
A vector containing the historical values, a vector containing the baseline, vector composed of binary variables that indicate whether an external impactor was detected for a given period.
In option, the graph obtained in the process if showgraph == TRUE.
Grandadam Patrik
data("mydata") baseline(mydata, promo_done = TRUE, showgraph = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.