aidsPx {micEcon} | R Documentation |
Calculate log price indices for the AIDS and LA-AIDS.
aidsPx( priceIndex, priceNames, data, shareNames = NULL, base = 1, coef = NULL, shifterNames = NULL )
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. |
Currently 7 different price indices are implemented:
The argument base
can be either
data
: The
means of the observations indicated as 'TRUE' are used as base prices
and quantities.
prices
and/or shares
that are numeric vectors specifying the values of the base prices
and/or base expenditure shares.
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.
Arne Henningsen
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.
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 ) ) )