Description Usage Arguments Details Value Author(s) References See Also Examples
Calculate log price indices for the AIDS and LA-AIDS.
1 2 |
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:
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.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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 ) ) )
|
Loading required package: lmtest
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: micEcon
If you have questions, suggestions, or comments regarding one of the 'micEcon' packages, please use a forum or 'tracker' at micEcon's R-Forge site:
https://r-forge.r-project.org/projects/micecon/
1947 1948 1949 1950 1951 1952 1953 1954
4.045308 4.125273 4.085022 4.106832 4.205332 4.225481 4.218708 4.222115
1955 1956 1957 1958 1959 1960 1961 1962
4.200047 4.204955 4.237166 4.272828 4.255110 4.266261 4.281529 4.288436
1963 1964 1965 1966 1967 1968 1969 1970
4.307764 4.318767 4.337441 4.388123 4.401451 4.435673 4.479683 4.530530
1971 1972 1973 1974 1975 1976 1977 1978
4.570344 4.605170 4.742872 4.876542 4.962223 4.994273 5.058455 5.153242
1979 1980 1981
NA NA NA
1947 1948 1949 1950 1951 1952
-0.49759092 -0.41320299 -0.45300487 -0.43511431 -0.32786145 -0.31138128
1953 1954 1955 1956 1957 1958
-0.31817931 -0.31886976 -0.33663897 -0.33206860 -0.29935557 -0.26328461
1959 1960 1961 1962 1963 1964
-0.28093023 -0.26998476 -0.25473107 -0.24747511 -0.23289439 -0.21710800
1965 1966 1967 1968 1969 1970
-0.19832376 -0.14720930 -0.13856930 -0.10439210 -0.05545885 0.00000000
1971 1972 1973 1974 1975 1976
0.03144753 0.07074422 0.20918663 0.34167482 0.42733893 0.46453365
1977 1978 1979 1980 1981
0.52847372 0.61968006 NA NA NA
attr(,"basePrices")
[1] 91.0 90.7 94.9 96.3
1947 1948 1949 1950 1951 1952
-0.57400146 -0.49166140 -0.52539706 -0.51217242 -0.40714555 -0.38602236
1953 1954 1955 1956 1957 1958
-0.39343754 -0.39341742 -0.40725041 -0.40054633 -0.36840298 -0.33107578
1959 1960 1961 1962 1963 1964
-0.34702731 -0.33502622 -0.32009105 -0.31158260 -0.29541320 -0.28056477
1965 1966 1967 1968 1969 1970
-0.26216979 -0.21285366 -0.20411966 -0.17038734 -0.12445934 -0.07026406
1971 1972 1973 1974 1975 1976
-0.03748968 0.00000000 0.13420591 0.27952943 0.36361346 0.39593072
1977 1978 1979 1980 1981
0.45706282 0.54831571 NA NA NA
attr(,"basePrices")
[1] 100 100 100 100
attr(,"baseShares")
[1] 0.25 0.25 0.25 0.25
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.