Bookmark and Share

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

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

st: Adjusting Brian Poi's nlsurquaid.ado by removing symmetry conditions and `at' in -nl-

From   Alex Olssen <>
To   "" <>
Subject   st: Adjusting Brian Poi's nlsurquaid.ado by removing symmetry conditions and `at' in -nl-
Date   Wed, 23 Feb 2011 15:35:15 +1300

Dear Statlisters,

My end goal is to estimate a nonlinear system of equations with adding up constraints similar to the QUAIDS model estimated by Brian Poi 2002 and 2008 in the Stata Journal.
Now I am trying to make one adjustment at a time to nlsurquaids.ado to get a handle on altering this function evaluator program.

Right now I am stuck trying to remove the symmetry conditions.  I am not actually estimating a demand system and I do not want the Slutsky symmetry conditions.
I altered nlsurquaids.ado by replacing all the lines that were similar to

scalar `g21' = `g12'    with     scalar `g21'=`at'[1,10]

and bumped the numbering of the [1,x] down for everything else so they didn't overlap.  Removing symmetry conditions left me with 21 parameters to estimate as opposed to Poi's 15 - the symmetry conditions constrain 6 elements below the diagonal.
I then changed the nlsur call from

nlsur quaids @ ... param(a1 a2...)  to include g21, g32 and g33 as parameters as they are no longer inferred from symmetry.

However running the code now gives me the following error messages
"could not evaluate equation 1
starting values invalid or some RHS variables have missing values"

I have successfully made another adjustment earlier and it all worked fine.
I actually don't understand what the `at' is really doing in function evaluator programs in -nl- .  I read the documentation but didn't manage to pick up what `at' was doing from there on my own.
Any help in explaining `at' or guidance with why my removal of symmetry conditions isn't working would be very much appreciated.

Kind regards,

Alex Olssen
Research Analyst
Motu Economic & Public Policy Research
Ph 939 4250  Fax 939 4251
This email contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email, facsimile or telephone and delete this email. Thank you

*   For searches and help try:

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