A tariff changes consumer prices and the revenue retained by sellers. This guide asks how a tariff on one firm’s two products changes prices, physical profits and importing-government revenue. It assumes trade 0.9.0, a compatible antitrust >= 0.99.43 and coordination >= 0.1.0 are installed. All inputs below are illustrative; prices are currency per unit and inside size is units.
specify() uses supplied structural parameters.
as_trade_fit() copies the fitted game without recalibrating
or solving it. simulate() solves the policy change. Firm A
owns products a and b, so its choices account for both products.
A producer-value statutory rate t becomes the
consumer-price fraction tau = t / (1 + t). Thus a statutory
25% tariff is .20, not .25, in this API.
library(trade)
source_owner <- setNames(c("A", "A", "B", "C"), c("a", "b", "c", "d"))
source_fit <- antitrust::specify(
"logit", "bertrand", variant = "standard",
prices = c(2, 2.2, 2.4, 2.6), ownerPre = unname(source_owner),
insideSize = 100, labels = c("a", "b", "c", "d"),
parameters = list(alpha = -1.5, meanval = c(3, 2.5, 2, 1.5))
)
policy_fit <- as_trade_fit(source_fit, tariffPre = 0,
cost_basis = "effective", margin_basis = "net_revenue")
tau <- .25 / 1.25
scenario <- simulate(policy_fit, tariffPost = c(tau, tau, 0, 0))
pre <- tariff_accounts(scenario, preMerger = TRUE)
post <- tariff_accounts(scenario, preMerger = FALSE)
prices_output <- data.frame(
product = post$product, firm = unname(source_owner[post$product]),
canonical_firm = post$firm,
price_pre = pre$price, price_post = post$price,
price_change_pct = 100 * (post$price / pre$price - 1),
q_pre = pre$q, q_post = post$q
)
knitr::kable(prices_output, digits = 3)| product | firm | canonical_firm | price_pre | price_post | price_change_pct | q_pre | q_post |
|---|---|---|---|---|---|---|---|
| a | A | 1 | 2.0 | 2.064 | 3.186 | 57.407 | 55.468 |
| b | A | 1 | 2.2 | 2.314 | 5.169 | 25.795 | 23.122 |
| c | B | 2 | 2.4 | 2.403 | 0.139 | 11.590 | 12.261 |
| d | C | 3 | 2.6 | 2.601 | 0.055 | 5.208 | 5.525 |
Read price_change_pct as a percentage relative to the
stored fitted baseline. The q columns are quantities, not
market shares. The original firm labels are retained by matching product
IDs: canonical firm IDs 1/2/3 correspond to A/B/C in this example. Use
the explicit mapping when exporting or joining firm data. Compare
product a, which is tariffed, with product c, which is untariffed:
rivals’ prices and quantities can respond even though their own tariff
is zero. These supplied parameters are an illustrative scenario, not
estimates from the displayed price vector.
Government receives tau * price * q; sellers retain
(1-tau) * price * q. Physical unit cost excludes the tariff
and is measured in currency per output unit. Multiply it by quantity to
obtain total production cost. Net revenue, producer profit and
government revenue are currency totals. Effective unit cost divides
physical unit cost by retention; it is a pricing representation, not
another payment.
product_accounts <- data.frame(product = post$product,
physical_unit_cost = post$physical_cost,
physical_total_cost = post$physical_cost * post$q,
net_revenue = post$net_revenue, producer_profit = post$producer_profit,
government_revenue = post$government_revenue)
knitr::kable(product_accounts, digits = 3)| product | physical_unit_cost | physical_total_cost | net_revenue | producer_profit | government_revenue |
|---|---|---|---|---|---|
| a | 0.586 | 32.495 | 91.576 | 59.081 | 22.894 |
| b | 0.786 | 18.171 | 42.799 | 24.629 | 10.700 |
| c | 1.680 | 20.602 | 29.466 | 8.864 | 0.000 |
| d | 1.911 | 10.555 | 14.372 | 3.817 | 0.000 |
account_totals <- function(x) c(
gross_revenue = sum(x$gross_revenue), net_revenue = sum(x$net_revenue),
physical_total_cost = sum(x$physical_cost * x$q),
producer_profit = sum(x$producer_profit),
government_revenue = sum(x$government_revenue))
knitr::kable(rbind(pre = account_totals(pre), post = account_totals(post)),
digits = 3)| gross_revenue | net_revenue | physical_total_cost | producer_profit | government_revenue | |
|---|---|---|---|---|---|
| pre | 212.920 | 212.920 | 83.327 | 129.592 | 0.000 |
| post | 211.808 | 178.214 | 81.823 | 96.391 | 33.594 |
For every product, physical producer profit plus government revenue
equals (price - physical_cost) * q. This is an accounting
identity over the included producers, not a finding about national
welfare or the nationality of a firm. The totals table sums all included
products: for example, net revenue minus physical total cost equals
producer profit. Government receipts are separate from net seller
revenue.
welfare <- tariff_welfare(scenario)
fields <- c("physical_producer_surplus_delta",
"importing_government_revenue_delta", "consumer_variation",
"monetary_consumer_change")
knitr::kable(data.frame(measure = fields,
change = unlist(welfare[fields], use.names = FALSE)), digits = 3)| measure | change |
|---|---|
| physical_producer_surplus_delta | -33.202 |
| importing_government_revenue_delta | 33.594 |
| consumer_variation | 6.424 |
| monetary_consumer_change | -6.424 |
The first two entries are monetary changes from the baseline. Positive consumer variation means compensation required for a price increase; monetary consumer change is its negative. Producer scope is all included producers and government scope is the importing government. Their accounting sum does not by itself establish a national or exact global welfare measure.
The accounts also distinguish net_margin, profit per
unit of net seller revenue;
physical_unit_profit = (1-tau)*price-physical_cost; and
effective_unit_markup = price-effective_cost. These have
different units and cannot be substituted for one another at a nonzero
tariff.
| What you have | Operation | Meaning |
|---|---|---|
| Observed inputs and an implemented calibration model | calibrate() |
Estimate structural parameters from those inputs |
| Supplied structural parameters | specify() |
Build the specified structural game |
| A compatible fitted game | as_trade_fit() |
Attach the policy contract without refitting |
| A fitted policy game and a scenario | simulate() |
Solve the requested counterfactual |
trade::supportedModels() lists complete implementations
and their supported operations. Native coordination games are promoted
from their own constructors; their registry entries do not create new
trade calibration APIs. Updating inputs, respecifying a model and
simulating a policy have distinct meanings.
Ownership remains actual ownership; seller retention is separate
state. With uniform retention within each firm, an effective-cost
transformation preserves its optimization problem. Mixed tariffs within
a portfolio require the retained-revenue equations. Multiplying an
ownership row by a tariff vector is not a universal correction, and a
tariff alone must not be added again as a physical mcDelta
shock.
At a nonzero baseline tariff, effective-cost and net-revenue margin bases must be compatible with the fitted source; declaring bases cannot repair an incompatible likelihood or prior. This example holds fitted demand and physical costs fixed. Calibrated predictions are sensitive to inputs and assumptions; ordinary deterministic output supplies no automatic sampling uncertainty.
Supported ordinary fitted-game sequential paths can include
ownership, cost, entry and exit changes. Entry is restricted to
supported source models. Native Stackelberg/core-fringe paths require
explicit roles after ownership changes and do not support entry. The
explicit TariffGameFit route does not handle quotas.
Continue with a binding quota (source)
or quantity-setting tariffs (source).
See ?as_trade_fit, ?TariffGameFit,
?tariff_accounts and ?tariff_welfare for exact
contracts. The mathematical
reference retains model theory; fitted-game
reuse covers advanced baseline and posterior conditions.