View source: R/bertrand_calibrate.R
| bertrand_calibrate | R Documentation |
Bertrand model calibration
bertrand_calibrate(
param,
own,
price,
shares,
cost,
weight = NA,
returnOutcomes = FALSE
)
param |
Price coefficient alpha parameter to calibrate |
own |
Ownership matrix |
price |
Price |
shares |
Observed market shares |
cost |
Marginal costs for each product |
weight |
Weighting vector of length equal to number of margins provided |
returnOutcomes |
logical; should equilibrium objects be returned (mean value parameter, prices, shares, costs) as a list. |
This function calculate the first-order conditions from a Bertrand price-setting model of competition. This function is only for standard logit demand. For nested logit or generalized nested logit, see bertrand_calibrate_gnl().
Distance between observed values and model predicted values for prices and shares
alpha <- -0.9
delta <- c(.81,.93,.82)
c_j <- c(.05,.31,.30)
own_pre = diag(3)
p0 <- c_j*1.1
share1 <- (exp(delta + alpha*p0))/(1+sum(exp(delta + alpha*p0)))
x00 <- c(-1)
wt_vector <- c(1,1,1)
bertrand_calibrate( param = x00,
own = own_pre, price = p0,
shares = share1, cost = c_j,
weight = wt_vector)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.