Forum: help
Monitor Forum | Start New ThreadRE: Inverse Almost Ideal Demand flexibilities [ Reply ] By: Arne Henningsen on 2017-05-28 15:47 | [forum:45163] |
... and if one or both of you want to implement the inverse AIDS in an R package (e.g. in micEconAids or a new package) -- which is probably much easier than you think -- I could assist you with this. /Arne |
RE: Inverse Almost Ideal Demand flexibilities [ Reply ] By: ena Jane on 2017-05-25 15:14 | [forum:45160] |
Hi, Stefan! These days I am trying to estimate inverse-Aids.But I found there are no relevant packages to use. Then I found your messages here about testing 'Flexibility of Inverse-Aids'. I wonder how you impose the Inverse-Aids in R? Is it ok to share the codes with me? So that I can take a reference. Please contact with quanyinhua0406@gmail.com Thank you so much! Kind Regards --From Jane |
RE: Inverse Almost Ideal Demand flexibilities [ Reply ] By: Arne Henningsen on 2017-04-11 20:39 | [forum:45093] |
Hi Stefan I would do the following: a) create 'shortcuts' for the coefficients, e.g. by: R> bAlaska <- coef( IAIDSsys13 )[ "<name of regressor>" ] R> bCod <- coef( IAIDSsys13 )[ "<name of regressor>" ] R> gAlaskaAlaska <- coef( IAIDSsys13 )[ "<name of regressor>" ] R> gAlaskaCod <- gCodAlaska <- R+ coef( IAIDSsys13 )[ "<name of regressor>" ] R> gCodCod <- coef( IAIDSsys13 )[ "<name of regressor>" ] b) calculate the price flexibilities, e.g. by: R> IAIDSforum$flexAlaskaAlaska <- with( IAIDSforum, R+ -1 + ( gAlaskaAlaska + bAlaska * ( wAlaska - bAlaska * lnQ ) ) / R+ wAlaska ) R> IAIDSforum$flexAlaskaCod <- with( IAIDSforum, R+ ( gAlaskaCod + bAlaska * ( wCod - bCod * lnQ ) ) / R+ wAlaska ) R> IAIDSforum$flexCodAlaska <- with( IAIDSforum, R+ ( gCodAlaska + bCod * ( wAlaska - bAlaska * lnQ ) ) / R+ wCod ) R> IAIDSforum$flexCodCod <- with( IAIDSforum, R+ -1 + ( gCodCod + bCod * ( wCod - bCod * lnQ ) ) / R+ wCod ) ATTENTION: untested code!!! Further explanations are given in my lecture notes "Introduction to Econometric Production Analysis with R": http://leanpub.com/ProdEconR/ These lecture notes focus on econometric production analysis but the procedures are basically the same as those for econometric demand analysis. /Arne |
Inverse Almost Ideal Demand flexibilities [ Reply ] By: Stefan Stefic on 2017-04-10 12:25 | [forum:45089] |
I need to calculate flexibilities of the Inverse AIDS model, with estimation and standard error.. IAIDSAlaska=Ralaska~lnQ+lnAlaska+lnHaddock+lnCod IAIDSHaddock=Rhaddock~lnQ+lnAlaska+lnHaddock+lnCod IAIDSCod=Rcod~lnQ+lnAlaska+lnHaddock+lnCod sysIAIDS12=list(IAIDSAlaska,IAIDSHaddock) IAIDSsys12=systemfit(sysIAIDS12,data=IAIDSforum, method = "SUR") summary(IAIDSsys12) sysIAIDS13=list(IAIDSAlaska,IAIDSCod) IAIDSsys13=systemfit(sysIAIDS13,data=IAIDSforum, method = "SUR") summary(IAIDSsys13) I need help for calculating the own and cross price flexibility which formula is fij= - δij+{γij+βi (wj- βj lnQ)}⁄(wi |