Resources

Setting bounds on parameters in nlsys

0

Hi,

I use command "nlsys" to match some moments in my project. I wonder if I can set the bound for the guesses of parameters. I know that option is available in "optmat" with  command "name.bounds={0.5 1}. Is there a similar command in "nlsys"?

 
Thank you!

Laura

Tags: asked July 19, 2013

2 Answers

0

Bounds on parameters can be placed using a math transformation. To constrain a parameter to be between a and b, use a logit transformation. First write a proc

proc logit(p,a,b);

   local y;
   y = (b - a) / (1 + exp(-p)) + a;
   retp(y);
endp;

This will constrain p to be between b and a, i.e., if p = -inf, y = a, and if p = + inf, y = b;

Imbed logit(x,a,b) wherever that parameter shows up in your equation. For example, suppose you have a parameter list, p[1:3].

p[1]*x^2 + logit(p[2],0,1)*x + p[3] = 0;

This will constrain the parameter p[2] to be between zero and one.

0

Also, your parameter estimate is the result of the call to logit(p,a,b);  Thus

p2hat = logit(p[2],0,1);