Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Dynamic quadratic almost ideal demand system


From   Nigussie Tefera <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Dynamic quadratic almost ideal demand system
Date   Fri, 7 Mar 2014 22:20:06 +0100

Dear Jorge,

Thanks a lot, your suggestion help to identify the causes of the
differences, I will work more on the model

Best

On Thu, Mar 6, 2014 at 9:28 PM, Nigussie Tefera
<[email protected]> wrote:
> Dear Jorge,
>
> Thanks a lot, your suggestion help me to sort out the differences. I will
> work more on the model
>
> Best
>
> Nigussie
>
>
> On Wednesday, March 5, 2014, Jorge Eduardo Pérez Pérez
> <[email protected]> wrote:
>>
>> Poi's quaids code bases the inclusion on demographics on this paper
>>
>> Ray, R.  1983.  Measuring the costs of children: An alternative
>> approach.  Journal of Public Economics 22: 89-102.
>>
>> which you can look up, From a quick look at that paper, the covariates
>> here enter in the coefficient of the log price index and in the price
>> index itself. That is in contrast to allowing them to modify a(p),
>> which allows them to enter linearly in the share equation.
>>
>> In general, modifying a(p) linearly in the share equation is
>> demographic translating. Modifying b(p) is demographic scaling. You
>> seem to be doing both, but Poi's approach only does scaling. That may
>> explain the difference of results.
>>
>> I suppose Poi's -quaids- exact formulas can be found in his 2012 Stata
>> Journal article, to which sadly I don't have access to right now. But
>> looking at the internals of his code, we can see what is being done.
>>
>> This is found in _quaids__utils.mata, a part of Poi's -quaids- routine
>>
>> -----
>>
>> if (ndemo > 0) {
>> cofp = J(rows(lnp), 1, 0)
>> for(i=1; i<=rows(lnp); ++i) {
>> cofp[i] = lnp[i,.]*(eta'*demo[i,.]')
>> }
>> cofp = exp(cofp)
>> mbar = 1 :+ demo*rho'
>> }
>> else {
>> cofp = J(rows(lnp), 1, 1)
>> mbar = J(rows(lnp), 1, 1)
>> }
>> if (quadratics == "") {
>> // The b(p) term
>> bofp = exp(lnp*beta')
>> }
>> else {
>> bofp = J(rows(lnp), 1, 1)
>> }
>> for(i=1; i<=neqn; ++i) {
>> shr[.,i] = alpha[i] :+ lnp*gamma[i,.]'
>> if (ndemo > 0) {
>> shr[., i] = shr[., i] +
>> (J(rows(lnp), 1, beta[i]) + demo*eta[.,i]):*
>> (lnexp - lnpindex - ln(mbar))
>> }
>> else {
>> shr[., i] = shr[., i] + beta[i]*(lnexp - lnpindex)
>>
>> }
>> if (quadratics == "") {
>> shr[., i] = shr[., i] + lambda[i]:/(bofp:*cofp):*(
>> (lnexp - lnpindex - ln(mbar)):^2)
>> }
>> }
>>
>> -----
>>
>> As can be seen, Poi's method allows b(p) to be scaled by a function
>> c(p), which in turn depends on interactions of log prices and
>> demographics. The total expenditure is also scaled by a mbar function,
>> which is equal to 1 + a linear function in demographics.
>>
>> Hope this helps,
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --------------------------------------------
>> Jorge Eduardo Pérez Pérez
>> Graduate Student
>> Department of Economics
>> Brown University
>>
>>
>> On Wed, Feb 26, 2014 at 1:46 PM, Nigussie Tefera
>> <[email protected]> wrote:
>> > Dear statlist,
>> >
>> > I am trying to estimate dynamic quadratic almost ideal demand system
>> > using Poi's 2012 nlsur _quaids approach.  Poi's 2012 approach, available
>> > with stata 13 version, can handle the linear and quadratic demand system
>> > with an extension for demographic variables. However, I need to extend
>> > the model for dynamic quaids as I am dealing with panel data analysis.
>> > Moreover, I need to control for expenditure endogeneity as well as zero
>> > consumption expenditure problem. The approaches for dealing with zero
>> > consumption expenditure varies but I prefer running multivariate probit
>> > estimation at first stage (to determine the probability of consuming
>> > that food items/groups and also to control any correlation among food
>> > items) and predicting the standard normal density function (PDF) and the
>> > standard normal cumulative distribution function (CDF) which could be
>> > augmented in the demand specification following Pan et al., 2008; Zheng
>> > and Henneberry, 2010 approaches. Predicting CDF and PDF is easy but
>> > augmenting in the demand system is a bit challenging as the Poi's 2012
>> > approach does not allow us to do so.
>> >
>> > Moreover, I have tried to write stata code based on Poi's 2008 nlsur
>> > code (available on the website) but I came up with different regression
>> > results as compared to the results with Poi's 2012 quaids. One causes of
>> > the difference could be the way that demographic variable entered in the
>> > model.  In order to do so I am modifying the alpha(i) both in the share
>> > equations as well as total price aggregate equation (a(p)) not in
>> > (b(p)). But I am not sure whether poi's quaids are doing the same or
>> > not. Any suggestion would be very grateful.
>> >
>> > Best
>> >
>> > Nigussie
>> >
>> > *
>> > *   For searches and help try:
>> > *   http://www.stata.com/help.cgi?search
>> > *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> > *   http://www.ats.ucla.edu/stat/stata/
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index