calc_omax_pmax: Calculate Omax and Pmax for Demand Curves
Description
Calculates the maximum expenditure (Omax) and the price at maximum expenditure (Pmax)
for the exponential demand model used in the two-part hurdle model.
Usage
calc_omax_pmax(Q0, k, alpha, price_range = NULL)
Value
A named list with:
Pmax
Price at maximum expenditure
Omax
Maximum expenditure (price * quantity)
Qmax
Quantity at Pmax
Arguments
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 NULL, which uses an adaptive range
based on alpha (approximately 0 to 10/alpha).
Details
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.
# Calculate for group-level parameterscalc_omax_pmax(Q0 = 10, k = 2, alpha = 0.5)
# With k >= e (~2.718), a local maximum existscalc_omax_pmax(Q0 = 10, k = 3, alpha = 0.5)