dirichlet | R Documentation |
Given consumer purchase summary data, it estimates the parameters of the Dirichlet model, which describes the consumer repeat-buying behavior of branded products. It also returns with several probability functions for users to calculate various theoretical quantities.
dirichlet(cat.pen, cat.buyrate, brand.share, brand.pen.obs, brand.name = NA, cat.pur.var = NA, nstar = 50, max.S = 30, max.K = 30, check = F)
cat.pen |
Product category penetration, which is the observed proportion of category buyers over a specific time period. |
cat.buyrate |
Category buyers' average purchase rate in a given period. This is derived as the total number of category purchase occasions divided by the total number of category buyers during a time period. |
brand.share |
A vector of brand market share. We typically define it as the proportions of purchase occasions that belong to different brands during the time period. |
brand.pen.obs |
A vector of observed brand penetration, which is the proportion of buyers for each brand during the time period. |
brand.name |
A character vector of the brand names. If not given (default), use "B1", "B2", etc. |
cat.pur.var |
The observed variance of category purchase rates across individuals. It is used for the method of moment estimation of the parameter K in the Dirichlet model. If it is not given (default), then estimate K by "mean and zeros"(see reference). |
nstar |
Maximum number of category purchases in the time period considered in the calculation. Any number larger than |
max.S |
Upper bound for the model parameter S in the optimization procedure to solve for S. Default to 30. |
max.K |
Upper bound for the model parameter K in the optimization procedure to solve for K. Default to 30. |
check |
A logical value. If T, print some diagnostic information. Defaul to F. |
The Dirichlet model and its estimation can be found in the reference paper. It is found to fit and reproduce the patterns of repeat buying of branded products quite well. Specifically, the dirichlet model is a mixture of distributions at four levels:
Each consumer's purchase incidences in a product category follow the Poisson process.
The purchase rates of the category by different consumers follow a Gamma distribution.
Each consumer's choices among the available brands follow a multinomial distribution, and
These brand choice probabilities follow a multivariate Beta or "Dirichlet" distribution across different consumers.
There are three structural parameters to be estimated:
Mean purchase rate of the category.
Measures the diversity of the overal category purchase frequency across consumers (smaller K implies more diversity).
Measures the diversity of the brand purchase propensity across consumers (smaller S implies more diversity).
To estimate M and K, we use the observed category penetration
(cat.pen
) and purchase rate (cat.buyrate
). To estimate S,
we use additionally the observed brand penetrations
(brand.pen.obs
) and brand market shares (brand.share
).
Note however once these three parameters are estimated, only the brand
market shares are needed by the Dirichlet model to compute various
repeat-buying theoretical statistics.
The estimated parameters, along with several probability functions that can access
the object data, are passed back in a list, which is assigned a
"dirichlet" class attribute. The result can be used by the print.dirichlet
,
summary.dirichlet
, and plot.dirichlet
method.
The study period (where we report the model result) is assumed to be 4
times of the observation period (input data). So if we use quarterly
data, the model output is annulized. This multiple (4) can be changed
using the member function period.set
.
A list with the following components:
M |
Estimated Dirichlet model parameter: mean purchase rate of the category. |
K |
Estimated Dirichlet model parameter: it measures the diversity of the overal category purchase frequency (smaller K implies more diversity). |
S |
Estimated Dirichlet model parameter: it measures the diversity of the brand purchase propensity (smaller S implies more diversity). |
nbrand |
Number of brands being considered in the produt category. |
nstar |
Input parameter: Maximum number of category purchases considered. |
cat.pen |
Input parameter: Category penetration in a given time period. |
cat.buyrate |
Input parameter: Category buyers' average purchase rate in a given time period. |
brand.share |
Input parameter: A vector of brand market share. |
brand.pen.obs |
Input parameter: A vector of observed brand penetration. |
brand.name |
Input parameter: A character vector of the brand names. |
check |
A logical flag that indicates whether to print the intermediate information in the model estimation. Default to F. |
error |
A logical flag that indicates if |
period.set |
A member function of the "dirichlet" class object with
one required parameter |
period.print |
A member function of the "dirichlet" class object
with no parameter. It indicates the current time period by printing the
multiple |
p.rj.n |
A member function of the "dirichlet" class object with
three required parameters |
Pn |
A member function of the "dirichlet" class object with one
required parameter |
brand.pen |
A member function of the "dirichlet" class object with
one required and one optional parameter ( |
brand.buyrate |
A member function of the "dirichlet" class object
with one required and one optional parameter |
wp |
A member function of the "dirichlet" class object with one
required and one optional parameter |
Feiming Chen
The Dirichlet: A Comprehensive Model of Buying Behavior. G.J. Goodhardt, A.S.C. Ehrenberg, C. Chatfield. Journal of the Royal Statistical Society. Series A (General), Vol. 147, No. 5 (1984), pp. 621-655
print.dirichlet
, summary.dirichlet
,
plot.dirichlet
, NBDdirichlet-package
# The following data comes from the example in section 3 of # the reference paper. They are Toothpaste purchase data in UK # in 1st quarter of 1973 from the AGB panel (5240 static panelists). cat.pen <- 0.56 # Category Penetration cat.buyrate <- 2.6 # Category Buyer's Average Purchase Rate in a given period. brand.share <- c(0.25, 0.19, 0.1, 0.1, 0.09, 0.08, 0.03, 0.02) # Brands' Market Share brand.pen.obs <- c(0.2,0.17,0.09,0.08,0.08,0.07,0.03,0.02) # Brand Penetration brand.name <- c("Colgate DC", "Macleans","Close Up","Signal","ultrabrite", "Gibbs SR","Boots Priv. Label","Sainsbury Priv. Lab.") dobj <- dirichlet(cat.pen, cat.buyrate, brand.share, brand.pen.obs, brand.name) print(dobj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.