View source: R/diversion_calc.R
| diversion_calc | R Documentation |
Calculates choice probabilities based on logit or generalized nested logit demand parameters
diversion_calc(
price,
alpha,
delta,
nest_allocation = NA,
mu = NA,
marginal = FALSE,
outsideOption = TRUE
)
price |
Price |
alpha |
Price coefficient |
delta |
Mean values |
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 |
marginal |
logical; if True, diversions are calculated as diversions from a small price increase. If False, diversions are calculated as second choice diversions. |
outsideOption |
logical; whether to include an outside option in choice set. Default is TRUE. |
This function calculates choice probabilities based on demand parameters for a logit or generalized nested logit demand system
Returns vector of choice probabilities for each good
diversion_calc(price=c(2.1,2.4,2.1),alpha=-0.9,delta=c(.81,.93,.82))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.