Description Usage Arguments Details Value Author(s) References See Also Examples
Calibrates consumer demand using (Nested) Constant Elasticity of Substitution (CES) and then simulates the price effect of a merger between two firms under the assumption that all firms in the market are playing a differentiated products Bertrand pricing game.
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  ces(prices,shares,margins,
ownerPre,ownerPost,
shareInside = 1,
normIndex=ifelse(sum(shares)<1,NA,1),
mcDelta=rep(0,length(prices)),
subset=rep(TRUE, length(prices)),
priceOutside = 1,
priceStart = prices,
isMax=FALSE,
labels=paste("Prod",1:length(prices),sep=""),
...
)
ces.nests(prices,shares,margins,
ownerPre,ownerPost,
nests=rep(1,length(shares)),
shareInside = 1,
normIndex=ifelse(sum(shares)<1,NA,1),
mcDelta=rep(0,length(prices)),
subset=rep(TRUE, length(prices)),
priceOutside = 1,
priceStart = prices,
isMax=FALSE,
constraint = TRUE,
parmsStart,
labels=paste("Prod",1:length(prices),sep=""),
...
)


Let k denote the number of products produced by all firms playing the Bertrand pricing game. 
prices 
A length k vector of product prices. 
shares 
A length k vector of product revenue shares. 
margins 
A length k vector of product margins, some of which may equal NA. 
nests 
A length k vector identifying the nest that each product belongs to. 
ownerPre 
EITHER a vector of length k whose values indicate which firm produced a product premerger OR a k x k matrix of premerger ownership shares. 
ownerPost 
EITHER a vector of length k whose values indicate which firm produced a product after the merger OR a k x k matrix of postmerger ownership shares. 
shareInside 
The proportion that a typical consumer spends on all products included in the ‘prices’ vector. Only needed to calculate compensating variation. Default is 1, meaning that all of a consumer's income is spent on products within the market. 
normIndex 
An integer specifying the product index against which the mean values of all other products are normalized. Default is 1. 
mcDelta 
A vector of length k where each element equals the proportional change in a product's marginal costs due to the merger. Default is 0, which assumes that the merger does not affect any products' marginal cost. 
subset 
A vector of length k where each element equals TRUE if the product indexed by that element should be included in the postmerger simulation and FALSE if it should be excluded.Default is a length k vector of TRUE. 
constraint 
if TRUE, then the nesting parameters for all nonsingleton nests are assumed equal. If FALSE, then each nonsingleton nest is permitted to have its own value. Default is TRUE. 
priceOutside 
A length 1 vector indicating the price of the outside good. Default is 1. 
priceStart 
A length k vector of starting values used to solve for equilibrium price. Default is the ‘prices’ vector. 
isMax 
If TRUE, checks to see whether computed price equilibrium locally maximizes firm profits and returns a warning if not. Default is FALSE. 
parmsStart 
A vector of starting values used to solve for price coefficient and nest parameters. The first element should always be the price coefficient and the remaining elements should be nesting parameters. Theory requires the nesting parameters to be greater than the price coefficient. If missing then the random draws with the appropriate restrictions are employed. 
labels 
A klength vector of labels. Default is "Prod#", where ‘#’ is a number between 1 and the length of ‘prices’. 
... 
Additional options to feed to the 
Using product prices, revenue shares and all of the
product margins from at least one firm, ces
is able to
recover the price coefficient and product mean valuations in a
Constant Elasticity of Substitution demand model. ces
then uses these
calibrated parameters to simulate the price effects of a merger between two firms under the
assumption that that all firms in the market are playing a
differentiated products Bertrand pricing game.
ces.nests
is identical to ces
except that it includes the ‘nests’
argument which may be used to assign products to different
nests. Nests are useful because they allow for richer substitution
patterns between products. Products within the same nest are assumed
to be closer substitutes than products in different nests. The degree
of substitutability between products located in different nests is
controlled by the value of the nesting parameter sigma.
The nesting parameters for singleton nests (nests containing
only one product) are not identified and normalized to 1. The vector of
sigmas is calibrated from the prices, revenue shares, and margins supplied
by the user.
By default, all nonsingleton nests are assumed to have a common value for sigma. This constraint may be relaxed by setting ‘constraint’ to FALSE. In this case, at least one product margin must be supplied from a product within each nest.
In both ces
and ces.nests
, if revenue shares sum to 1,
then one product's mean value is not identified and must be normalized
to 1. ‘normIndex’ may be used to specify the index (position) of the
product whose mean value is to be normalized. If the sum of revenue shares
is less than 1, both of these functions assume that the exists a k+1st
product in the market whose price and mean value are both normalized
to 1.
ces
returns an instance of class CES
.
ces.nests
returns an instance of CESNests
, a
child class of CES.
Charles Taragin charles.taragin@usdoj.gov
Anderson, Simon, Palma, Andre, and Francois Thisse (1992). Discrete Choice Theory of Product Differentiation. The MIT Press, Cambridge, Mass.
Epstein, Roy and Rubinfeld, Daniel (2004). “Effects of Mergers Involving Differentiated Products.”
Sheu G (2011). “Price, Quality, and Variety: Measuring the Gains From Trade in Differentiated Products.” U.S Department of Justice.
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  ## Calibration and simulation results from a merger between Budweiser and
## Old Style. Assume that typical consumer spends 1% of income on beer,
## and that total beer expenditure in US is 1e9
## Source: Epstein/Rubenfeld 2004, pg 80
prodNames < c("BUD","OLD STYLE","MILLER","MILLERLITE","OTHERLITE","OTHERREG")
ownerPre <c("BUD","OLD STYLE","MILLER","MILLER","OTHERLITE","OTHERREG")
ownerPost <c("BUD","BUD","MILLER","MILLER","OTHERLITE","OTHERREG")
nests < c("R","R","R","L","L","R")
price < c(.0441,.0328,.0409,.0396,.0387,.0497)
shares < c(.071,.137,.251,.179,.093,.269)
margins < c(.3830,.5515,.5421,.5557,.4453,.3769)
names(price) <
names(shares) <
names(margins) <
prodNames
result.ces <ces(price,shares,margins,ownerPre=ownerPre,ownerPost=ownerPost,
shareInside=.01,labels=prodNames)
print(result.ces) # return predicted price change
summary(result.ces) # summarize merger simulation
elast(result.ces,TRUE) # returns premerger elasticities
elast(result.ces,FALSE) # returns postmerger elasticities
diversion(result.ces,TRUE) # return premerger diversion ratios
diversion(result.ces,FALSE) # return postmerger diversion ratios
cmcr(result.ces) #calculate compensating marginal cost reduction
upp(result.ces) #calculate Upwards Pricing Pressure Index
CV(result.ces) #calculate compensating variation as a percent of
#representative consumer income
CV(result.ces,1e9) #calculate compensating variation in dollars
#1e9 is an estimate of total US beer expenditure
## Implement the Hypothetical Monopolist Test
## for BUD and OLD STYLE using a 5% SSNIP
HypoMonTest(result.ces,prodIndex=1:2)
## Get a detailed description of the 'CES' class slots
showClass("CES")
## Show all methods attached to the 'CES' Class
showMethods(classes="CES")
## Show which class have their own 'elast' method
showMethods("elast")
## Show the method definition for 'elast' and Class 'CES'
getMethod("elast","CES")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs in the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.