Quantity competition has two different data layouts in trade: differentiated products with Logit demand, and plants producing homogeneous products. This guide uses trade 0.9.0 with compatible antitrust/coordination dependencies and illustrative deterministic data. Prices are currency per unit and outputs are units. See the tariff starter (source) for net-revenue margins and CV signs.
Each product has its own demand and price. Firms choose their portfolio’s quantities. The Miller portfolio below contains two products.
library(trade)
products <- c("BUD", "OLD STYLE", "MILLER", "MILLER-LITE",
"OTHER-LITE", "OTHER-REG")
owner <- c("BUD", "OLD STYLE", "MILLER", "MILLER", "OTHER-LITE", "OTHER-REG")
price <- c(.0441, .0328, .0409, .0396, .0387, .0497)
quantities <- c(.066, .172, .253, .187, .099, .223) * 100
margins <- c(.3830, .5515, .5421, .5557, .4453, .3769)
tariff <- c(0, 0, 0, 0, .1, .1)
fit <- logit_cournot_tariff(prices = price, quantities = quantities,
margins = margins, owner = owner, tariffPost = tariff, labels = products)
product_results <- data.frame(product = products,
price_pre = antitrust::calcPrices(fit, TRUE),
price_post = antitrust::calcPrices(fit, FALSE),
q_pre = antitrust::calcQuantities(fit, TRUE),
q_post = antitrust::calcQuantities(fit, FALSE))
knitr::kable(product_results, digits = 4)| product | price_pre | price_post | q_pre | q_post | |
|---|---|---|---|---|---|
| BUD | BUD | 0.0441 | 0.0441 | 6.6006 | 7.2350 |
| OLD STYLE | OLD STYLE | 0.0328 | 0.0328 | 17.2013 | 18.8544 |
| MILLER | MILLER | 0.0409 | 0.0409 | 25.2973 | 27.7284 |
| MILLER-LITE | MILLER-LITE | 0.0396 | 0.0396 | 18.6986 | 20.4956 |
| OTHER-LITE | OTHER-LITE | 0.0387 | 0.0402 | 9.9007 | 7.0954 |
| OTHER-REG | OTHER-REG | 0.0497 | 0.0507 | 22.3014 | 18.5912 |
Compare OTHER-LITE’s quantity and price before/after with Miller’s
portfolio. These columns are levels. The tariff .1 is 10%
of consumer price, equivalent to a producer-value statutory rate
.1/.9; it is not a statutory 10% rate. With quantities
converted to shares summing to one, the default standard route uses an
inside normalization product; it does not observe a positive outside
share just because quantities were supplied.
calcDiagnostics(fit)
#> Prices Shares Margins Market Elasticity
#> BUD 0 0.009784222 -139.99041 NA
#> OLD STYLE 0 0.007461340 -42.55424 NA
#> MILLER 0 -0.010597558 17.80326 NA
#> MILLER-LITE 0 -0.007459137 18.41930 NA
#> OTHER-LITE 0 0.007287209 -95.89199 NA
#> OTHER-REG 0 0.006389270 -21.57003 NA
fitted_margin <- antitrust::calcMargins(fit, preMerger = TRUE)
margin_fit <- data.frame(product = products, observed_margin = margins,
fitted_margin = as.numeric(fitted_margin),
relative_discrepancy_pct = 100 * (1 - margins / as.numeric(fitted_margin)))
knitr::kable(margin_fit, digits = 4)| product | observed_margin | fitted_margin | relative_discrepancy_pct |
|---|---|---|---|
| BUD | 0.3830 | 0.1596 | -139.9904 |
| OLD STYLE | 0.5515 | 0.3869 | -42.5542 |
| MILLER | 0.5421 | 0.6595 | 17.8033 |
| MILLER-LITE | 0.5557 | 0.6812 | 18.4193 |
| OTHER-LITE | 0.4453 | 0.2273 | -95.8920 |
| OTHER-REG | 0.3769 | 0.3100 | -21.5700 |
The diagnostic convention is
100 * (1 - observed/fitted), a relative calibration
discrepancy, not a percentage-point margin difference. BUD’s observed
margin is 0.3830, while its fitted margin is 0.15959; the reported
discrepancy is approximately -139.99%, not a negative margin of that
magnitude. These illustrative observations fit this Cournot
specification poorly on margins, even though prices and
quantities reproduce the baseline closely. Treat this as a calibration
warning before drawing empirical conclusions. Diagnostics are not
confidence intervals for the tariff effect.
All plants below sell the same product at a common price. A quantity
matrix has one row per plant and one column per product. We construct
baseline observations from linear inverse demand and quadratic plant
costs, then impose a statutory 25% tariff on plant 1 using the
consumer-price fraction .20.
n <- 5
capacity_parameter <- c(.4, .45, .5, .55, .6)
intercept <- 10
slope <- -.25
foc <- matrix(slope, n, n)
diag(foc) <- 2 * slope - 1 / capacity_parameter
q0 <- as.numeric(solve(foc, rep(-intercept, n)))
p0 <- intercept + slope * sum(q0)
mc0 <- q0 / capacity_parameter
margin0 <- 1 - mc0 / p0
plant_tariff <- matrix(c(.25 / 1.25, rep(0, n - 1)), ncol = 1)
plant <- cournot_tariff(prices = p0, quantities = matrix(q0, ncol = 1),
margins = matrix(margin0, ncol = 1), owner = diag(n),
tariffPre = matrix(0, n, 1), tariffPost = plant_tariff)
plant_q_pre <- antitrust::calcQuantities(plant, TRUE)
plant_q_post <- antitrust::calcQuantities(plant, FALSE)
knitr::kable(data.frame(plant = seq_len(n), q_pre = as.numeric(plant_q_pre),
q_post = as.numeric(plant_q_post)), digits = 3)| plant | q_pre | q_post |
|---|---|---|
| 1 | 2.339 | 1.927 |
| 2 | 2.602 | 2.631 |
| 3 | 2.859 | 2.890 |
| 4 | 3.111 | 3.145 |
| 5 | 3.356 | 3.393 |
c(price_pre = antitrust::calcPrices(plant, TRUE),
price_post = antitrust::calcPrices(plant, FALSE))
#> price_pre.P1 price_post.P1
#> 6.433112 6.503546capacity_parameter controls the curvature of cost
(MC=q/capacity_parameter); it is not a hard capacity limit.
Actual plant capacity constraints use the constructor’s
capacitiesPre/capacitiesPost arguments.
Compare the foreign plant’s response with the other four plants while
remembering the product price is common to all plants.
| Model | Input layout | Relevant constraint |
|---|---|---|
logit_cournot_tariff() |
Product vectors | Valid interior solution for active differentiated products |
cournot_tariff() |
Plant × product matrices | Nonnegative output and plant capacity complementarity |
For commonly owned plants, marginal revenue includes the retained revenue from all owned output affected by a quantity change. Unequal tariffs within that portfolio require the corresponding product/plant retention weights. Ownership itself remains the actual ownership matrix. Do not add the policy wedge a second time as a physical cost shock or copy a universal ownership-row scaling recipe.
The homogeneous solver can handle output corners; differentiated mixed-retention support does not imply automatic selection of zero-output products. Exit must be specified through the supported route. Compare demand/cost specifications and input sensitivity when applying either model; a solved toy example does not establish the assumptions for an empirical market.
See ?logit_cournot_tariff, ?cournot_tariff,
trade::supportedModels() and the mathematical
reference. The reference separates retained-revenue equations from
effective-cost shortcuts and preserves the longer demand and calibration
background.