Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: which STATA version for Poi's QUAIDS command

From   "Brian P. Poi" <>
Subject   Re: st: which STATA version for Poi's QUAIDS command
Date   Mon, 18 Mar 2013 16:52:46 -0500

On 03/18/2013 04:15 PM, Luca Tiberti wrote:
Hi Nick, thanks for this

here is the output of describe, short

obs:         3,860
vars:            39                          18 Mar 2013 15:37
size:       455,480
Sorted by:  serial
      Note:  dataset has changed since last saved

For your info, I had already tried by keeping only variables finally
entering into the demand system and compress them. However I was not
able to run succesfully the command.

Thanks for your help,


How many goods are in your demand system?  How many demographic variables are you specifying?

To estimate the model, -quaids- must create temporary variables to hold observation-level derivatives of each equation with respect to each of the parameters.  The details are in the methods and formulas section of [R] nlsur.

For a basic AIDS model, with three goods there are 7 free parameters and 2 estimated equations, for a total of 14 temporary variables -quaids- needs to create.  With four goods, there are 12 free parameters and 3 estimated equations, for a total of 36 temporary variables.  If my math is correct, a basic AIDS model with 15 goods has 133 parameters and 14 estimated equations for a total of 1,862 temporary variables.  If you have 16 goods, there are 2,250 derivatives that must be stored in temporary variables, too many for Stata/IC to handle.

If you include the quadratic income term (the QUAIDS model), then you will hit Stata/IC's variable limit if you try to fit a 15-good model.

Throw one demographic variable into the QUAIDS model, and you are down to 13 goods.  Five demographic variables and you're down to 11 goods.

In short, having many goods and demographics can quickly balloon the number of parameters in the model and hence the number of temporary variables needed during estimation.

I hope this helps.

   -- Brian Poi

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index