Page 1 of 1

Cross restrictions on parameters and estimation

PostPosted: Sat Feb 11, 2006 3:29 pm
by jmaih
Dear all,
Could anyone tell me how to impose cross-restrictions on parameters during estimation in dynare? Here are two examples:

example 1:
a+b=c, where a and b are estimated while c is constant

example 2: d=h(e, f), where e and f are estimated while d is constant and h(.) is a known and possibly nonlinear function of its arguments.

Thanks,

Junior

Re: Cross restrictions on parameters and estimation

PostPosted: Sat Feb 11, 2006 6:10 pm
by MichelJuillard
Dear Junior,

in both cases, you have only one free parameter and you need to redefine the second one as a function of the first one. You should do that at the beginning of the "model" section and you must put a # sign at the beginning of the line (in order to differenciate this definition from a model equation)


jmaih wrote:example 1:
a+b=c, where a and b are estimated while c is constant
,/quote]
# b= c - a

and you don't estimate b, only a
example 2: d=h(e, f), where e and f are estimated while d is constant and h(.) is a known and possibly nonlinear function of its arguments.


# f = h_1(d,e)

where h_1() is the inverse function, expressing f as a function of d and e. Again, you estimate e, but not f

Kind regards

Michel

Re: Cross restrictions on parameters and estimation

PostPosted: Sat Feb 11, 2006 7:06 pm
by MichelJuillard
Dear Junior,

in both cases, you have only one free parameter and you need to redefine the second one as a function of the first one. You should do that at the beginning of the "model" section and you must put a # sign at the beginning of the line (in order to differenciate this definition from a model equation)


jmaih wrote:example 1:
a+b=c, where a and b are estimated while c is constant

# b= c - a

and you don't estimate b, only a
example 2: d=h(e, f), where e and f are estimated while d is constant and h(.) is a known and possibly nonlinear function of its arguments.


# f = h_1(d,e)

where h_1() is the inverse function, expressing f as a function of d and e. Again, you estimate e, but not f

Kind regards

Michel

PostPosted: Sat Feb 11, 2006 7:42 pm
by jmaih
Dear Michel,
Thank you very much for a good and prompt reply.

Best regards,
Junior

PostPosted: Wed Feb 15, 2006 7:10 pm
by jmaih
Dear Michel,
I just came across another problem with cross-parameter restrictions. How would you impose a restriction of the following type

a+b+c=0
b>=0
c>=0

Thanks,
Junior

PostPosted: Wed Feb 15, 2006 9:19 pm
by MichelJuillard
jmaih wrote:a+b+c=0
b>=0
c>=0


#c = -a1^2-b1^2

where a1 is the square root of a, and b1 of b, respectively

Then you estimate a1 and b1 instead of a and b.

Best

Michel

PostPosted: Wed Feb 15, 2006 9:27 pm
by jmaih
Dear Michel,
Thank you for the prompt reply. I think I wrote too quickly. What I meant was actually

a+b+c=0
b>=0
c>=0

Sorry for the inconvenience,
Junior

PostPosted: Wed Feb 15, 2006 9:32 pm
by MichelJuillard
I replied too quickly too.
Use
#c = -a-b
to impose the restiction between a, b and c

Use a gamma, an inverted gamma or a beta prior on a and b to impose non negativity (and smaller than 1 with the beta)

Best

Michel

PostPosted: Wed Feb 15, 2006 9:32 pm
by jmaih
Dear Michel,
I don't understand what is going on. I write a+b+c strictly less than 1 and the message appears as a+b+c equal to zero. Perhaps the inequality sign is interpreted as a html character...

Junior