ai.model | R Documentation |
Modelfunction to create Deatons and Muellbauers (1980) famous Almost-Ideal Demand System or the Quadratic Almost-Ideal Demand System by Banks et al. (1997).
ai.model(
w,
p,
exp,
alph0 = 10,
logp = TRUE,
logexp = TRUE,
priceindex = "translog",
modeltype = "AI",
ray = FALSE,
demogr
)
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. |
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.
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
ai and qai
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.