This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
DefaultSalesModule.Rd
100 lines (87 loc) · 4.71 KB
/
DefaultSalesModule.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module_sales.R
\name{DefaultSalesModule}
\alias{DefaultSalesModule}
\title{Model advertiser and competitor sales.}
\usage{
DefaultSalesModule(data.dt, price, mean.price = 0,
advertiser.demand.intercept = list(),
advertiser.demand.slope = list(favorability = rep(0,
length(kFavorabilityStates))), competitor.demand.max = list(loyalty = c(1,
0, 1)), competitor.demand.replacement = list(loyalty = c(0.5, 0, 1)),
purchase.quantity.intercept = 1, purchase.quantity.slope = 0,
purchase.quantity.competitor = 1, unit.cost = 0,
advertiser.transitions = list(), competitor.transitions = list())
}
\arguments{
\item{data.dt}{data.table with rows corresponding to population segments and
columns corresponding to specific variables}
\item{price}{numeric vector of product price over time. If the vector is
shorter than the number of timepoints, it is repeated as necessary.}
\item{mean.price}{numeric scaler, the mean of price over time. Defaults to
zero.}
\item{advertiser.demand.intercept}{list of numeric vectors corresponding to
each brand state (favorability, loyalty, and availability). The
product of multiplicands corresponding to a particular segment with
'purchase' activity state is the probability consumers in that
segment will purchase the advertiser's product if the price is
mean.price and there is no competition. Missing members of the list have no
effect on the calculation.}
\item{advertiser.demand.slope}{list of numeric vectors corresponding to each
brand state (favorability, loyalty, and availability). The product of
multiplicands corresponding to a particular segment with 'purchase'
activity state is the linear decrease in the probability consumers in
that segment will purchase the advertiser's product when the price
increases by 1, when there is no competition. Missing members of the
list have no effect on the calculation.}
\item{competitor.demand.max}{list of numeric vectors corresponding to each
brand state (favorability, loyalty, and availability). The product of
multiplicands corresponding to a particular segment with 'purchase'
activity state is the probability consumers in that segment will
purchase a competitor's product when advertiser's product is too
expensive to be a feasible choice. Missing members of the list have
no effect on the calculation.}
\item{competitor.demand.replacement}{list of numeric vectors corresponding
to each brand state (favorability, loyalty, and availability). The
product of multiplicands corresponding to a particular segment
specifies the degree to which advertiser and competitor sales are
replacements for each other. At 1, competitor sales are unaffected by
advertiser pricing, and competitor sales replace advertiser sales to
the greatest degree possible. At 0, advertiser sales are unaffected
by the presence of the competitor, and advertiser sales replace
competitor sales to the greatest degree possible. Thus, a reasonble
interpretation of consumer loyalty might set this parameter to
\code{list(loyalty = c(0.5, 0.1, 0.9)}. Missing members of the list
have no effect on the calculation.}
\item{purchase.quantity.intercept}{numeric, at least 1. Represents the
average number of units bought by each consumer purchasing from the
advertiser's brand, if price is mean.price.}
\item{purchase.quantity.slope}{numeric, generally >= 0. Represents the
decrease in the average purchase quantity per consumer purchasing
from the advertiser's brand given a unit increase in price. Missing
members of the list have no effect on the calculation.}
\item{purchase.quantity.competitor}{average number of units bought by
consumers purchasing a comeptitor's product. Must be at the least the
default value of 1.}
\item{unit.cost}{numeric greater than 0, cost of goods sold, for one unit of
the advertiser's product.}
\item{advertiser.transitions}{list of transition matrices for each brand
state, specifying post-purchase changes in consumer mindset for those
who purchased the advertiser's brand. A named list with members
'favorability', 'loyalty', and 'availability' is expected. Any
missing members will have no effect. The default value, \code{list()}
results in no post-purchase migration.}
\item{competitor.transitions}{list of transition matrices for each brand
state, specifying post-purchase changes in consumer mindset for those
who purchased a competitor's brand. A named list with members
'favorability', 'loyalty', and 'availability' is expected. Any
missing members will have no effect. The default value, \code{list()}
results in no post-purchase migration.}
}
\value{
\code{invisible(NULL)}. \code{data.dt} updated by reference.
}
\description{
Simulate consumer purchase behavior, and thus the advertiser's and its
competitors' sales.
}