Linear-Functions {antitrust} R Documentation

## Linear and Log-Linear Demand Calibration and Merger Simulation

### Description

Calibrates consumer demand using either a linear or log-linear demand system and then simulates the prices effect of a merger between two firms under the assumption that all firms in the market are playing a differentiated products Bertrand game.

Let k denote the number of products produced by all firms.

### Usage

```linear(
prices,
quantities,
margins,
diversions,
symmetry = TRUE,
ownerPre,
ownerPost,
mcDelta = rep(0, length(prices)),
subset = rep(TRUE, length(prices)),
priceStart = prices,
control.slopes,
labels = paste("Prod", 1:length(prices), sep = ""),
...
)

loglinear(
prices,
quantities,
margins,
diversions,
ownerPre,
ownerPost,
mcDelta = rep(0, length(prices)),
subset = rep(TRUE, length(prices)),
priceStart = prices,
control.equ,
labels = paste("Prod", 1:length(prices), sep = ""),
...
)
```

### Arguments

 `prices` A length k vector product prices. `quantities` A length k vector of product quantities. `margins` A length k vector of product margins. All margins must be either be between 0 and 1, or NA. `diversions` A k x k matrix of diversion ratios with diagonal elements equal to -1. Default is missing, in which case diversion according to quantity share is assumed. `symmetry` If TRUE, requires the matrix of demand slope coefficients to be symmetric and homogeneous of degree 0 in prices, both of which suffice to make demand consistent with utility maximization theory. Default is TRUE. `ownerPre` EITHER a vector of length k whose values indicate which firm produced a product pre-merger OR a k x k matrix of pre-merger 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 post-merger ownership shares. `mcDelta` A length k vector 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 post-merger simulation and FALSE if it should be excluded.Default is a length k vector of TRUE. `priceStart` A length k vector of prices used as the initial guess in the nonlinear equation solver. Default is ‘prices’. `control.slopes` A list of `optim` control parameters passed to the calibration routine optimizer (typically the `calcSlopes` method). `labels` A k-length vector of labels. Default is "Prod#", where ‘#’ is a number between 1 and the length of ‘prices’. `...` Additional options to feed to the solver. See below. `control.equ` A list of `BBsolve` control parameters passed to the non-linear equation solver (typically the `calcPrices` method).

### Details

Using price, quantity, and diversion information for all products in a market, as well as margin information for (at least) all the products of any firm, `linear` is able to recover the slopes and intercepts in a Linear demand system and then uses these demand parameters to simulate the price effects of a merger between two firms under the assumption that the firms are playing a differentiated Bertrand pricing game.

`loglinear` uses the same information as `linear` to uncover the slopes and intercepts in a Log-Linear demand system, and then uses these demand parameters to simulate the price effects of a merger of two firms under the assumption that the firms are playing a differentiated Bertrand pricing game.

‘diversions’ must be a square matrix whose off-diagonal elements [i,j] estimate the diversion ratio from product i to product j (i.e. the estimated fraction of i's sales that go to j due to a small increase in i's price). Off-diagonal elements are restricted to be non-negative (products are assumed to be substitutes), diagonal elements must equal -1, and rows must sum to 0 (negative if you wish to include an outside good) . If ‘diversions’ is missing, then diversion according to quantity share is assumed.

‘ownerPre’ and ‘ownerPost’ values will typically be equal to either 0 (element [i,j] is not commonly owned) or 1 (element [i,j] is commonly owned), though these matrices may take on any value between 0 and 1 to account for partial ownership.

Under linear demand, an analytic solution to the Bertrand pricing game exists. However, this solution can at times produce negative equilibrium quantities. To accommodate this issue, `linear` uses `constrOptim` to find equilibrium prices with non-negative quantities. `...` may be used to change the default options for constrOptim.

`loglinear` uses the non-linear equation solver `BBsolve` to find equilibrium prices. `...` may be used to change the default options for `BBsolve`.

### Value

`linear` returns an instance of class `Linear`. `loglinear` returns an instance of `LogLin`, a child class of `Linear`.

### Author(s)

Charles Taragin ctaragin@ftc.gov

### References

von Haefen, Roger (2002). “A Complete Characterization Of The Linear, Log-Linear, And Semi-Log Incomplete Demand System Models.” Journal of Agricultural and Resource Economics, 27(02). doi: 10.22004/ag.econ.31118.

`aids` for a demand system based on revenue shares rather than quantities.

### Examples

```## Simulate a merger between two single-product firms in a
## three-firm market with linear demand with diversions
## that are proportional to shares.
## This example assumes that the merger is between
## the first two firms

n <- 3 #number of firms in market
price    <- c(2.9,3.4,2.2)
quantity <- c(650,998,1801)
margin <- c(.435,.417,.370)

#simulate merger between firms 1 and 2
owner.pre <- diag(n)
owner.post <- owner.pre
owner.post[1,2] <- owner.post[2,1] <- 1

result.linear <- linear(price,quantity,margin,ownerPre=owner.pre,ownerPost=owner.post)

print(result.linear)           # return predicted price change
summary(result.linear)         # summarize merger simulation

elast(result.linear,TRUE)      # returns premerger elasticities
elast(result.linear,FALSE)     # returns postmerger elasticities

diversion(result.linear,TRUE)  # returns premerger diversion ratios
diversion(result.linear,FALSE) # returns postmeger diversion ratios

cmcr(result.linear)            # returns the compensating marginal cost reduction

CV(result.linear)              # returns representative agent compensating variation

## Implement the Hypothetical Monopolist Test
## for products 1 and 2 using a 5\% SSNIP

#HypoMonTest(result.linear,prodIndex=1:2)

## Get a detailed description of the 'Linear' class slots
showClass("Linear")

## Show all methods attached to the 'Linear' Class
showMethods(classes="Linear")

## Show which class have their own 'elast' method
showMethods("elast")

## Show the method definition for 'elast' and Class 'Linear'
getMethod("elast","Linear")

```

[Package antitrust version 0.99.25 Index]