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: Nlsur Quaids
From
"Brian P. Poi" <[email protected]>
To
[email protected]
Subject
Re: st: Nlsur Quaids
Date
Mon, 18 Jul 2011 20:35:18 -0400
On 07/18/2011 06:40 PM, Ana wrote:
Dear Statalisters (and Brian Poi),
I'm using nlsur Quaids from Brian Poi (2008).
My routine is (the same as Poi's one):
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
I'm trying to compare two models: unrestricted model and restricted model.
My restriction is something like this: `g22' = `g12'*`g13'
The problem is that I'm getting r(198) error when I run the restricted model.
The only thing that I include in the original model is:
tempname `g22'
scalar `g22' = `g12'*`g13'
The mistakes is clearly a syntax one (problably the multiplication is
not correct).
Can anyone help me?
I really appreciate it.
There are two issues I see here. One,
. tempname `g22'
should be
. tempname g22 (without `' ticks)
because you are declaring a new temporary scalar.
The other is that since you are constraining g22, it is no longer a
separate parameter to be estimated, so you shouldn't declare it in your
-nlsur- statement:
. nlsur quaids @ w1 w2 w3 lnp1-lnp4 lnexp, ifgnls nequations(3) ///
param(a1 a2 a3 b1 b2 b3 g11 g12 g13 g23 g33 l1 l2 l3) nolog
^ (I took out g22)
If you have other parameter restrictions like that one, then you'll want
to take them out of the param() option, too.
Out of curiosity, where does the restriction g22 = g12*g13 come from?
-- Brian Poi
-- [email protected]
*
* 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/