Learn R Programming

micEcon (version 0.4-0)

aidsTestConsist: Consistency Test of the AIDS

Description

Test whether the specification of the AIDS is consistent with microeconomic demand theory (i.e. utility maximisation).

Usage

aidsTestConsist( priceNames, shareNames, totExpName, data, coef = NULL,
      alpha0 = ifelse( is.null( coef$alpha0 ), 0, coef$alpha0 ) )

## S3 method for class 'aidsEst': testConsist( object, ... )

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 the data.
coef
a list containing the coefficients alpha, beta and gamma.
alpha0
coefficient $\alpha_0$ of the translog price index.
object
an object of class aidsEst.
...
currently not used.

Value

  • a list containing following elements:
  • monotonya logical vector indicating whether the monotony condition is fulfilled at each observation.
  • mPercentpercent of observations where the monotony condition is fulfilled.
  • concavitya logical vector indicating whether the concavity condition is fulfilled at each observation.
  • cPercentpercent of observations where the concavity condition is fulfilled.
  • cMatricesa list of the 'C' matrices for each observation to check for concavity (see Deaton and Muellbauer, 1980b, p.76 ).

Details

testConsist.aidsEst is a wrapper function to aidsTestConsist that extracts all relevant arguments for aidsTestConsist from object.

References

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

Deaton, A.S. and J. Muellbauer (1980b) Economics and Consumer Behavior, Cambridge University Press, Cambridge.

See Also

aidsEst, aidsElas

Examples

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

   priceNames <- c( "pFood1", "pFood2", "pFood3", "pFood4" )
   shareNames <- c( "wFood1", "wFood2", "wFood3", "wFood4" )

   estResult <- aidsEst( priceNames, shareNames, "xFood",
      data = Blanciforti86, method = "IL:L" )
   tc <- aidsTestConsist( priceNames, shareNames, "xFood", Blanciforti86,
      coef = estResult$coef )
   tc$mPercent   # great!
   tc$cPercent   # Oh, that is bad!

   # the same can be obtained in an easier way
   testConsist.aidsEst( estResult )

Run the code above in your browser using DataLab