Cross restrictions on parameters and estimation

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Cross restrictions on parameters and estimation

Postby jmaih » Sat Feb 11, 2006 3:29 pm

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
jmaih
 
Posts: 24
Joined: Tue Jan 17, 2006 6:12 pm

Re: Cross restrictions on parameters and estimation

Postby MichelJuillard » Sat Feb 11, 2006 6:10 pm

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
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Re: Cross restrictions on parameters and estimation

Postby MichelJuillard » Sat Feb 11, 2006 7:06 pm

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
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby jmaih » Sat Feb 11, 2006 7:42 pm

Dear Michel,
Thank you very much for a good and prompt reply.

Best regards,
Junior
jmaih
 
Posts: 24
Joined: Tue Jan 17, 2006 6:12 pm

Postby jmaih » Wed Feb 15, 2006 7:10 pm

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
jmaih
 
Posts: 24
Joined: Tue Jan 17, 2006 6:12 pm

Postby MichelJuillard » Wed Feb 15, 2006 9:19 pm

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
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby jmaih » Wed Feb 15, 2006 9:27 pm

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
jmaih
 
Posts: 24
Joined: Tue Jan 17, 2006 6:12 pm

Postby MichelJuillard » Wed Feb 15, 2006 9:32 pm

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
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby jmaih » Wed Feb 15, 2006 9:32 pm

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
jmaih
 
Posts: 24
Joined: Tue Jan 17, 2006 6:12 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests