Given a set of prices and incomes, and model parameters,calculate the elasticities using numerical derivatives. Optionally, you can pass the model results for the base values, if you've already calculated them.

calc.elas.actual(Ps, Pn, Y, params, basedata = NULL)

Arguments

Ps

Staple food prices

Pn

Nonstaple food prices

Y

Per-capita income

params

Model parameters. See description in food.dmnd.

basedata

Model results for the base values of Ps, Pn, and Y.

Value

data frame with elasticities

Details

The inputs Ps, Pn, and Y can be vectors, but if they are, they must all be the same length