bertrand_foc: Bertrand first-order conditions

View source: R/bertrand_foc.R

bertrand_focR Documentation

Bertrand first-order conditions

Description

Bertrand first-order conditions

Usage

bertrand_foc(
  price,
  own,
  alpha,
  delta,
  cost,
  nest_allocation = NA,
  mu = NA,
  sumFOC = FALSE
)

bertrand_foc_c(
  cost,
  price,
  own,
  alpha,
  delta,
  nest_allocation = NA,
  mu = NA,
  sumFOC = FALSE
)

Arguments

price

Price

own

Ownership matrix

alpha

Price coefficient

delta

Mean values

cost

Marginal costs for each product

nest_allocation

For generalized nested logit demand, a J-by-K matrix where each element (j,k) designates the membership of good j in nest k. Rows should sum to 1.

mu

Nesting parameters for each nest

sumFOC

logical; whether to return the sum of squares of the first-order conditions. Defaults to FALSE, in which case it returns each product first-order condition as a vector.

Details

This function calculate the first-order conditions from a Bertrand price-setting model of competition

Value

The first-order conditions

Examples

alpha  <- -0.9
delta <- c(.81,.93,.82)
c_j <- c(.05,.31,.30)

own_pre = diag(3)

p0 <- c_j*1.1

bertrand_foc(price = p0,
             own = own_pre, alpha= alpha,
             delta = delta, cost = c_j)


mergersim documentation built on July 21, 2026, 5:09 p.m.