Learn R Programming

micEcon (version 0.5-22)

aidsEst: Estimating the Almost Ideal Demand System (AIDS)

Description

aidsEst does an econometric estimation of the Almost Ideal Demand System (AIDS)

Usage

aidsEst( priceNames, shareNames, totExpName, data,
      method = "LA", priceIndex = "Ls", pxBase = 1,
      hom = TRUE, sym = TRUE,
      shifterNames = NULL, instNames = NULL,
      estMethod = ifelse( is.null( instNames ), "SUR", "3SLS" ),
      ILmaxiter = 50, ILtol = 1e-5, alpha0 = 0, restrict.regMat = FALSE, ... )

## S3 method for class 'aidsEst': print( x, ... )

Arguments

priceNames
a vector of strings containing the names of the prices.
shareNames
a vector of strings containing the names of the expenditure shares.
totExpName
a string containing the variable name of total expenditure.
data
a data frame containing all required variables.
method
character string specifying the method to estimate the AIDS: either 'LA' or 'IL' (see deatils).
priceIndex
character string specifying the price index for the 'Linear Approximation': either 'S', 'SL', 'P', 'L', 'Ls', or 'T' (see details).
pxBase
The base to calculate the LA-AIDS price indices (see aidsPx).
hom
logical. Should the homogeneity condition be imposed?
sym
logical. Should the symmetry condition be imposed?
shifterNames
an optional vector of strings containing the names of the demand shifters.
instNames
a vector of strings containing the names of instrumental variables.
estMethod
estimation method (e.g. 'SUR' or '3SLS', see systemfit).
ILmaxiter
maximum number of iterations of the 'Iterated Linear Least Squares Estimation'.
ILtol
tolerance level of the 'Iterated Linear Least Squares Estimation'.
alpha0
the intercept of the translog price index ($\alpha_0$).
restrict.regMat
logical. Method to impose homogeneity and symmetry restrictions: either via restrict.matrix (default) or via restrict.regMat (see systemfit).
x
An object of class aidsEst.
...
additional arguments of aidsEst are passed to systemfit; additional arguments of print.aidsEst are currently ignored.

Value

  • a list of class aidsEst containing following objects:
  • coefa list containing the vectors/matrix of the estimated coefficients (alpha, beta, and gamma).
  • r2$R^2$-values of all share equations.
  • r2q$R^2$-values of the estimated quantities.
  • wFittedfitted expenditure shares.
  • wResidresiduals of the expenditure shares.
  • qObsobserved quantities / quantitiy indices.
  • qFittedfitted quantities / quantitiy indices.
  • qResidresiduals of the estimated quantities.
  • estestimation result, i.e. the object returned by systemfit.
  • iteriterations of SUR/3SLS estimation(s). If the AIDS is estimated by the 'Iterated Linear Least Squares Estimator' (ILLE): a vector containing the SUR/3SLS iterations at each iteration.
  • ILiternumber of iterations of the 'Iterated Linear Least Squares Estimation'.
  • methodthe method used to estimate the aids (see details).
  • priceIndexthe name of the price index (see details).
  • lnplog of the price index used for estimation.
  • pMeansmeans of the prices.
  • wMeansmeans of the expenditure shares.
  • xtMeanmean of total expenditure.
  • callthe call of aidsEst.
  • priceNamesnames of the prices.
  • shareNamesnames of the expenditure shares.
  • totExpNamename of the variable for total expenditure.
  • basePricesthe base prices of the Paasche, Laspeyres, or Tornqvist price index.
  • baseSharesthe base shares of the Laspeyres, simplified Laspeyres, or Tornqvist price index.

Details

Argument method can specify two different estimation methods: The 'Linear Approximate AIDS' (LA) and the 'Iterative Linear Least Squares Estimator' (IL) proposed by Blundell and Robin (1999). Argument priceIndex can specify six different price indices for the LA-AIDS:
  • 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 'Iterative Linear Least Squares Estimator' (IL) needs starting values for the (translog) price index. Starting values are taken from an initial estimation of the 'Linear Approximate AIDS' (LA) with the price index specified by argument priceIndex.

References

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

Blundell, R. and J.M. Robin (1999) Estimationin Large and Disaggregated Demand Systems: An Estimator for Conditionally Linear Systems. Journal of Applied Econometrics, 14, p. 209-232.

See Also

summary.aidsEst, aidsElas, aidsCalc.

Examples

Run this code
# Using data published in Blanciforti, Green & King (1986)
   data( Blanciforti86 )
   # Data on food consumption are available only for the first 32 years
   Blanciforti86 <- Blanciforti86[ 1:32, ]

   ## Repeating the demand analysis of Blanciforti, Green & King (1986)
   ## Note: Blanciforti, Green & King (1986) use scaled data,
   ##       which leads to slightly different results
   estResult <- aidsEst( c( "pFood1", "pFood2", "pFood3", "pFood4" ),
      c( "wFood1", "wFood2", "wFood3", "wFood4" ), "xFood",
      data = Blanciforti86, priceIndex = "SL", maxiter = 100 )
   print( estResult )
   elas( estResult )

   ## Estimations with a demand shifter: linear trend
   priceNames <- c( "pFood1", "pFood2", "pFood3", "pFood4" )
   shareNames <- c( "wFood1", "wFood2", "wFood3", "wFood4" )
   Blanciforti86$trend <- c( 0:( nrow( Blanciforti86 ) - 1 ) )
   estResult <- aidsEst( priceNames, shareNames, "xFood",
      data = Blanciforti86, shifterNames = "trend" )
   print( estResult )

   # Estimations with two demand shifters: linear + quadratic trend
   Blanciforti86$trend2 <- c( 0:( nrow( Blanciforti86 ) - 1 ) )^2
   estResult <- aidsEst( priceNames, shareNames, "xFood",
      data = Blanciforti86, shifterNames = c( "trend", "trend2" ) )
   print( estResult )

Run the code above in your browser using DataLab