| calc_omax_pmax | R Documentation |
Calculates the maximum expenditure (Omax) and the price at maximum expenditure (Pmax) for the exponential demand model used in the two-part hurdle model.
calc_omax_pmax(Q0, k, alpha, price_range = NULL)
Q0 |
Intensity parameter (consumption at price 0). |
k |
Scaling parameter for the exponential decay. |
alpha |
Elasticity parameter (rate of decay). |
price_range |
Numeric vector of length 2 specifying the price range
to search for Pmax. Default is |
For the demand function:
Q(p) = Q_0 \cdot \exp(k \cdot (\exp(-\alpha \cdot p) - 1))
Expenditure is E(p) = p * Q(p). Omax is the maximum of E(p) and Pmax is the price at which this maximum occurs. These are found numerically.
The search range is automatically adjusted based on alpha to ensure the maximum is found. For small alpha values, Pmax can be quite large.
A named list with:
Price at maximum expenditure
Maximum expenditure (price * quantity)
Quantity at Pmax
calc_group_metrics, fit_demand_hurdle
# Calculate for group-level parameters
calc_omax_pmax(Q0 = 10, k = 2, alpha = 0.5)
# With k >= e (~2.718), a local maximum exists
calc_omax_pmax(Q0 = 10, k = 3, alpha = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.