ai.model: Q/AI model function

View source: R/ai_model.R

ai.modelR Documentation

Q/AI model function

Description

Modelfunction to create Deatons and Muellbauers (1980) famous Almost-Ideal Demand System or the Quadratic Almost-Ideal Demand System by Banks et al. (1997).

Usage

ai.model(
  w,
  p,
  exp,
  alph0 = 10,
  logp = TRUE,
  logexp = TRUE,
  priceindex = "translog",
  modeltype = "AI",
  ray = FALSE,
  demogr
)

Arguments

w

character vector of m budgetshares used for estimation.

p

character vector of m prices.

exp

single character vector of total expenditure.

alph0

start value for translog price index.

logp

logical if prices are log prices.

logexp

logical if expenditure is log expenditure.

priceindex

character either "translog" or "S" for the stone price index.

modeltype

character either "AI" or "QAI" for AI or QAI model.

ray

logical if Ray (1983) scaling should be included. If TRUE requires demographic vector.

demogr

character vector of k demographic variables.

Details

While Ray and Stata use log(m0) for the demographic variables, there is no guarantee, that m0 is positive. The model relies much on the correct starting values. Therefore log(abs(m0)) is used.

References

Deaton, Angus S., Muellbauer, John: An Almost Ideal Demand System, The American Economic Review 70(3), American Economic Association, 312-326, 1980

Banks, James, Blundell, Richard, Lewbel, Arthur: Quadratic Engel Curves and Consumer Demand, The Review of Economics and Statistics 79(4), The MIT Press, 527-539, 1997

Ray, Ranjan: Measuring the costs of children: An alternative approach, Journal of Public Economics 22(1), 89-102, 1983

See Also

ai and qai


JanMarvin/nlsur documentation built on June 24, 2024, 2:58 a.m.