| share_calc | R Documentation |
Calculates choice probabilities based on logit or generalized nested logit demand parameters
share_calc(
price,
delta,
alpha,
nest_allocation = NA,
mu = NA,
returnLogsum = FALSE,
outsideOption = TRUE
)
price |
Price |
delta |
Mean values |
alpha |
Price coefficient |
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 |
returnLogsum |
logical; whether to return the denominator of the choice probabilities (also known as the log-sum term). Defaults to FALSE, in which case the function returns a vector with each product's choice probability. |
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
share_calc(price=c(2.1,2.4,2.1),delta=c(.81,.93,.82),alpha=-0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.