aidsCalc {micEcon}R Documentation

Shares and Quantities of the Almost Ideal Demand System

Description

Given prices, total expenditure and coefficients this function calculates the demanded quantities and expenditure shares based on the Almost Ideal Demand System.

Usage

   aidsCalc( pNames, xtName, data = NULL, px = "TL", lnp = NULL,
      coef = NULL, alpha0 = ifelse( is.null( coef$alpha0 ), 0,
      coef$alpha0 ) )

Arguments

pNames a vector of strings containing the names of the prices.
xtName a string containing the variable name of total expenditure.
data a data frame containing the data.
px prices index (see aidsPx).
lnp log of the price index (only required if 'px' is not 'TL').
coef a list containing the coefficients alpha, beta and gamma.
alpha0 coefficient α_0 of the translog price index.

Value

aidsCalc returns a list with following elements:

shares a data frame containing the calculated expenditure shares.
quantities a data frame containing the calculated quantites.

Author(s)

Arne Henningsen ahenningsen@agric-econ.uni-kiel.de

References

Deaton, A.S. and J. Muellbauer (1980) An Almost Ideal Demand System. American Economic Review, 70, p. 312-326.

See Also

aidsEst, aidsPx

Examples

   data( Blanciforti86 )
   # Data on food consumption are available only for the first 32 years
   Blanciforti86 <- Blanciforti86[ 1:32, ]

   pNames <- c( "pFood1", "pFood2", "pFood3", "pFood4" )
   wNames <- c( "wFood1", "wFood2", "wFood3", "wFood4" )

   ## LA-AIDS
   estResult <- aidsEst( pNames, wNames, "xFood",
      data = Blanciforti86, method = "LA:L" )

   lnp <- aidsPx( "L", pNames, wNames, Blanciforti86 )

   fitted <- aidsCalc( pNames, "xFood", Blanciforti86,
      coef = estResult$coef, lnp = lnp )

   fitted$shares  # equal to estResult$wFitted
   fitted$quant   # equal to estResult$qFitted

   ## AIDS
   estResult <- aidsEst( pNames, wNames, "xFood",
      data = Blanciforti86, method = "IL:L" )

   fitted <- aidsCalc( pNames, "xFood", Blanciforti86,
      coef = estResult$coef )

   fitted$shares  # equal to estResult$wFitted
   fitted$quant   # equal to estResult$qFitted


[Package micEcon version 0.2-2 Index]