single_product_optimization: single_product_optimization

View source: R/single_product_optimization.R

single_product_optimizationR Documentation

single_product_optimization

Description

Calculating the optimum price based on linear and logit models for a single product.

Usage

single_product_optimization(
  x,
  y,
  service_product_name,
  degree_poly = 3,
  current_price,
  plot = FALSE
)

Arguments

x

a vector of average weekly/monthly/daily price data of a product.

y

a vector of average weekly/monthly/daily sales data of a product.

service_product_name

the name of the product or service.

degree_poly,

the polynomial degrees, the default is 3.

current_price

the current price of the product or service

plot

Default is false,if true, a plot is generated

Details

calculate the optimized price based on the price response function. the price response function is measured twice, one with linear model and one time with a logit model. a simulation is then made with each price response function to define the maximum revenue for each. finally, a suggestion of which model to choose and the optimum price to use for this product. it is preferable to de-seasonalize the sales data before fitting if the sales are affected by spikes and declines due to regular events as holidays and weekends.

Value

a list of the squared error of th logit model, the squared error of the linear model, the best model for this product, the optimum price for both the linear and the logit model, the current price,the a,b,c parameters of th logit model,the linear model paremeters , data simulated at different price points and th expected revenue and the fitting results of both the logit and linear model.

Author(s)

"haytham omar email: <haytham@rescaleanalytics.com>"

Examples

single_product_optimization(x= c(5,8,10,12),y=c(25,21,23,15),
service_product_name = "Movie",current_price = 8.5,plot=TRUE)

inventorize documentation built on June 1, 2022, 1:07 a.m.