These functions generate a function that can be used as the income elasticity functions for staple or nonstaple foods. Staple and nonstaple foods each have their own functional forms, given by eta.s and eta.n. There is also a constant elasticity function that can be used for testing, though it is not formally part of the model design.

eta.constant(eta0)

eta.s(nu1, y0, mc.mode = FALSE)

eta.n(nu1)

Arguments

eta0

Value of the constant elasticity.

nu1

Income elasticity at Y=1

y0

Value of Y for which elasticity = 0 (this is generally the peak of the curve).

mc.mode

If true, then treat the first two parameters not as nu1 and y0, but as direct specifications of k and lambda. This flag is necessary becaue nu1 and y0, while more intuitive to work with, are not a complete specification of the parameter space. (That is, there are valid models that can only be specified in terms of k and lambda.)

Value

A function suitable for use as either eta.s or eta.n in the food demand model.

Details

#' Income elasticity functions have the following signature:

  • function(Y, calcQ)

where Y is the per-capita GDP, and calcQ is a flag indicating whether the function should calcluate the income quantity term or the income elasticity.

Functions

  • eta.s: Generate an income elasticity function for staple foods.

  • eta.n: Generate an income elasticity function for nonstaple foods.