Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
"Brian P. Poi" <brian@poiholdings.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: nlsur quaids result depends on previous command |

Date |
Sat, 09 Jul 2011 12:12:52 -0400 |

On 07/09/2011 02:09 AM, Johannes Kutsam wrote:

Dear all, (and especially Brian Poi), I am estimating a QUAIDS demand system with nlsur quaids (POI 2008) (http://www.stata-journal.com/article.html?article=st0029_1 ) I think found an error in either nlsur or quaids: The coefficients are dependent on the command called before. It can be reproduced using the example in sj8-4 webuse food nlsur quaids @ w1 w2 w3 lnp1-lnp4 lnexp,ifgnls nequations(3) param(a1 a2 a3 b1 b2 b3 g11 g12 g13 g22 g23 g33 l1 l2 l3) nolog nlsur quaids @ w1 w2 w3 lnp1-lnp4 lnexp,ifgnls nequations(1) param(a1 a2 a3 b1 b2 b3 g11 g12 g13 g22 g23 g33 l1 l2 l3) nolog nlsur quaids @ w1 w2 w3 lnp1-lnp4 lnexp,ifgnls nequations(3) param(a1 a2 a3 b1 b2 b3 g11 g12 g13 g22 g23 g33 l1 l2 l3) nolog Note that the 3 line with "nequations(1)" is of course wrong - because we have 3 equations. BUT once this line was executed The correct command with "nequations(3) will yield wrong coefficients. (I am not saying one should run wrongly specified systems...but it happens when developing) I suspect that some variables are not initialized correctly in quaids that could cause this problem. When I clear the dataset and load it again I again get the same coefficents as reported in sj8-4. So there is something temporarily saved by the call to nlsur quaids that confuses a subsequent call.

Let's look at the second call to -nlsur- more carefully:

__00**** w2 w3 lnp1 lnp2 lnp3 lnp4 lnexp

-- Brian Poi -- brian@poiholdings.com * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: nlsur quaids result depends on previous command***From:*"Johannes Kutsam" <johannes.kutsam@gmail.com>

- Prev by Date:
**Re: st: Post hoc analysis after twoway repeated measures anova (one factor between - one within)** - Next by Date:
**st: reg3: averaging across K equations and testing that average coeff equals zero** - Previous by thread:
**st: nlsur quaids result depends on previous command** - Next by thread:
**st: Break if no convergence after certain time** - Index(es):