aidsPx: Price Index for the AIDS

View source: R/aidsPx.R

aidsPxR Documentation

Price Index for the AIDS

Description

Calculate log price indices for the AIDS and LA-AIDS.

Usage

   aidsPx( priceIndex, priceNames, data, shareNames = NULL, base = 1, coef = NULL,
      shifterNames = NULL )

Arguments

priceIndex

the price index to be used (see details).

priceNames

a vector of strings containing the names of the prices.

data

a data frame containing the required variables.

shareNames

a vector of strings containing the names of the expenditure shares.

base

the base to calculate the indices (see details).

coef

a list containing the coefficients alpha0, alpha, beta, and gamma (only needed for the translog price index).

shifterNames

an optional vector of strings containing the names of the demand shifters that modify the alphas of the Translog price index.

Details

Currently 7 different price indices are implemented:

  • translog price index ('TL'),

  • Stone price index ('S'),

  • Stone price index with lagged shares ('SL'),

  • loglinear analogue to the Paasche price index ('P'),

  • loglinear analogue of the Laspeyres price index ('L'),

  • simplified loglinear analogue of the Laspeyres price index ('Ls'), and

  • Tornqvist price index ('T').

The argument base can be either

  • a single number: the row number of the base prices and quantities,

  • a vector indicating several observations: The means of these observations are used as base prices and quantities, or

  • a logical vector with the same length as the data: The means of the observations indicated as 'TRUE' are used as base prices and quantities.

  • a list with elements prices and/or shares that are numeric vectors specifying the values of the base prices and/or base expenditure shares.

Value

A vector containing the log price index. If argument priceIndex is "P", "Ls", or "T", the returned vector has the attribute(s) basePrices and/or baseShares that are numeric vectors of the base prices and/or base expenditure shares for calculating the price indices.

Author(s)

Arne Henningsen

References

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

Moschini, G. (1995) Units of Measurement and the Stone Index in Demand System Estimation. American Journal of Agricultural Economics, 77, p. 63-68.

See Also

aidsEst

Examples

   data( Blanciforti86 )

   # Stone price index
   aidsPx( "S", c( "pFood1", "pFood2", "pFood3", "pFood4" ),
      Blanciforti86, c( "wFood1", "wFood2", "wFood3", "wFood4" ) )

   # (log-linear analogue of the) Paasche price index
   aidsPx( "P", c( "pFood1", "pFood2", "pFood3", "pFood4" ),
      Blanciforti86, c( "wFood1", "wFood2", "wFood3", "wFood4" ),
      base = row.names(Blanciforti86) == "1970" )

   # Tornqvist price index
   aidsPx( "T", c( "pFood1", "pFood2", "pFood3", "pFood4" ),
      Blanciforti86, c( "wFood1", "wFood2", "wFood3", "wFood4" ),
      base = list( prices = rep( 100, 4 ), shares = rep( 0.25, 4 ) ) )

micEconAids documentation built on May 20, 2022, 5:05 p.m.