[Limdep Nlogit List] Problem with NLSUR

William Greene wgreene at stern.nyu.edu
Tue Mar 17 22:06:38 EST 2009


James. If you ultimately got convergence, then no, you should not worry about
the results. Warnings sometimes show up during the iterations as the solver
searches the parameter space for a solution. Since you have not prevented "a"
from being in the negative region, trial values might end up there. A common
solution is to estimate c in a = exp(c), then, when done, just compute a from
the estimated c.  As to your second question, the way you have specified it, 
you don't have that model if a is negative, so it is a moot point. Likewise, it 
won't "affect" the results, since if a is negative, there will be no results. It
does raise a question as to what happens if you can't keep a from being negative.
In my proposed solution above, c is unconstrained, but as the solver looks for
the solution, c would become very large and negative. You should take this as
evidence that there is something wrong with your specification.
Sincerely,
/Bill Greene


----- Original Message -----
From: "James Rao" <James.Rao at agr.uni-goettingen.de>
To: "Limdep and Nlogit Mailing List" <limdep at limdep.itls.usyd.edu.au>
Sent: Tuesday, March 17, 2009 5:58:17 AM GMT -05:00 Columbia
Subject: Re: [Limdep Nlogit List] Problem with NLSUR

Thanks for your response about the log minus error. Its true that I have a
function that contains a log(a). In response to your clarification I have two
further questions:
   1. So does it mean that the eventual results obtained are invalid due to
this logminus error? 
   2. And if I have to constrain (a) to be positive, won't this affect the
specification of my model and the eventual results obtained thereof?

=============================================================================
==
Rao E.O. James (Msc)
Research Associate/PhD Student

Department of Agricultural Economics and Rural Development
Georg-August University of Göttingen
Platz der Gottinger Sieben 5
37073 Göttingen, Germany.
 
Tell:+49-551-394443 (Office)
E-mail: jimrao2 at yahoo.co.uk;  James.Rao at agr.uni-goettingen.de

Courage is not the absence of fear but the triumph over it ... so fear not to
fear ... but strive to overcome fear!




-----Original Message-----
From: limdep-bounces at limdep.itls.usyd.edu.au on behalf of
wgreene at stern.nyu.edu
Sent: Fri 3/13/2009 7:15 PM
To: Limdep and Nlogit Mailing List
Subject: Re: [Limdep Nlogit List] Problem with NLSUR
 
James. If the actual function contains log(a) without constraining a to be
positive, that would be the problem.
The error would apply to every obsevation but the program tries not to repeat
the error N times.
/Bill Greene

Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "Rao, James" <James.Rao at agr.uni-goettingen.de>

Date: Fri, 13 Mar 2009 18:57:55 
To: Limdep and Nlogit Mailing List<limdep at limdep.itls.usyd.edu.au>
Subject: Re: [Limdep Nlogit List] Problem with NLSUR


Thanks a lot for your response. Actually the example I used was quite
simplistic. My actual system of equations is nonlinear and that is why I am
using NL3SLS. I was able to run the estimation after implementing the
suggested correction. While the iterations proceeded and eventually produced
some results, there were some error messages appearing after some of the
iterations which I did not quite understand. Here is an excerpt of the error
messages:

Error   590: Obs.=     1 Cannot compute function: Logminus
Warning   137: Iterations: function not computable at crnt. trial estimate
  Error   590: Obs.=     1 Cannot compute function: Logminus
Warning   137: Iterations: function not computable at crnt. trial estimate
  Error   590: Obs.=     1 Cannot compute function: Logminus
Warning   137: Iterations: function not computable at crnt. trial estimate
  Error   590: Obs.=     1 Cannot compute function: Logminus
Warning   137: Iterations: function not computable at crnt. trial estimate
  Error   590: Obs.=     1 Cannot compute function: Logminus
Warning   137: Iterations: function not computable at crnt. trial estimate

Could it be due to my unrealistic starting values? 

=============================================================================
==
Rao E.O. James (Msc)
Research Associate/PhD Student

Department of Agricultural Economics and Rural Development
Georg-August University of Göttingen
Platz der Gottinger Sieben 5
37073 Göttingen, Germany.
 
Tell:+49-551-394443 (Office)
E-mail: jimrao2 at yahoo.co.uk;  James.Rao at agr.uni-goettingen.de

Courage is not the absence of fear but the triumph over it ... so fear not to
fear ... but strive to overcome fear!




-----Original Message-----
From: limdep-bounces at limdep.itls.usyd.edu.au on behalf of William Greene
Sent: Fri 3/13/2009 12:50 AM
To: Limdep and Nlogit Mailing List
Subject: Re: [Limdep Nlogit List] Problem with NLSUR
 
Dear Mr. James.  Continuing ...
Given that neither of the LHS variables appears on the RHS of these
equations, you probably don't need NL3SLS; nonlinear least squares
will suffice. But, if any of x2,x3 or x4 are endogenous, you'd need
5 instruments for the 5 parameters. If, say, it is x2, then you have
ONE,X3,X4, but you'd need two others.  You need at least one moment
equation for each parameter being estimated.  The shortage of instruments
is what is causing he singularity. The program is trying to invert a
5x5 matrix based only two instruments - it has rank 2.
/Bill Greene


----- Original Message -----
From: wgreene at stern.nyu.edu
To: "Limdep and Nlogit Mailing List" <limdep at limdep.itls.usyd.edu.au>
Sent: Thursday, March 12, 2009 7:07:01 PM GMT -05:00 US/Canada Eastern
Subject: Re: [Limdep Nlogit List] Problem with NLSUR


Dear limdep listers,

Am pretty new to limdep so kindly excuse my silly questions and mistakes. Am
trying to estimate a nonlinear system of equations using the NLSUR command
for NL3SLS exemplified as follows:

NLSUR   ;Lhs = lnY, lnfert_d
        ;Fn1 = a1 + a2*x2 + a3*x3
        ;Fn2 = -Log(a2) + b1*x3 + b2*x4
        ;Labels = a1, a2, a3, b1, b2
        ;Start = 0, 1, 0, 0, 0
        ;Inst = x3, x4$

Whenever I try to run this estimation I get the following error messages
"Error   143: Models - estimated variance matrix of estimates is singular"
"Error   447: Current estimated covariance matrix for slopes is singular"

Where could the mistake be?

=============================================================================
==
Rao E.O. James (Msc)
Research Associate/PhD Student

Department of Agricultural Economics and Rural Development
Georg-August University of Göttingen
Platz der Gottinger Sieben 5
37073 Göttingen, Germany.
 
Tell:+49-551-394443 (Office)
E-mail: jimrao2 at yahoo.co.uk;  James.Rao at agr.uni-goettingen.de

Courage is not the absence of fear but the triumph over it ... so fear not to
fear ... but strive to overcome fear!


_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au


Sent from my Verizon Wireless BlackBerry
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au

_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au
_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au

_______________________________________________
Limdep site list
Limdep at limdep.itls.usyd.edu.au
http://limdep.itls.usyd.edu.au



More information about the Limdep mailing list