determinacy model, prior covers both in/determinacy region

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.

determinacy model, prior covers both in/determinacy region

Postby ZBCPA » Tue Feb 09, 2016 12:09 pm

Dear Johannes Pfeifer,

Could I ask you a question that is very important to me?

In my model, there is only one parameter "theta" which is always >1, determining if the model is determinacy or indeterminacy.
When 1<theta<1.35, the model is determinacy;
when theta>=1.35, the model is indeterminacy;

Now if I write dynare code for the determinacy case, set mean of theta=1.3, standard deviation of theta=0.4, theta>1, then the code is
Code: Select all
theta, , , ,gamma_pdf,1.3,0.4,1, ;

Such distribution covers both determinacy and indeterminacy region.

When doing bayesian estimation, if dynare picks a draw like theta=1.38, which is in the indeterminacy region, does dynare discard it? OR dynare never picks a draw from indeterminacy region? Will the prior integrate to 1?

Many thanks in advance,
Best regards,
Huan
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: determinacy model, prior covers both in/determinacy regi

Postby jpfeifer » Sat Feb 20, 2016 8:25 am

During MCMC all proposed draws from the prior in the indeterminacy region will be rejected. Thus, the MCMC will be correct. However, you will have a problem in model_comparison because the prior does not integrate to 1 and the marginal data densities will be incorrectly computed as they assume a proper prior.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: determinacy model, prior covers both in/determinacy regi

Postby ZBCPA » Sun Mar 06, 2016 10:38 am

jpfeifer wrote:During MCMC all proposed draws from the prior in the indeterminacy region will be rejected. Thus, the MCMC will be correct. However, you will have a problem in model_comparison because the prior does not integrate to 1 and the marginal data densities will be incorrectly computed as they assume a proper prior.


Dear Johannes,

Could I ask you a question about estimate determinacy model and indeterminacy model?

There is only one parameter "theta" which is always >1, determining if the model is determinacy or indeterminacy, which is generally calibrated to be 1.2 in literature.
When 1<theta<1.35, the model is determinacy;
when theta>=1.35, the model is indeterminacy;
In addition to that, Farmer's JEDC(2015)paper shows how to use dynare to estimate indeterminacy model.

What I am trying to do is to build indeterminacy and determinacy model separately and estimate them using dynare, finally make a model comparison to see which model is more supported by the data.
When estimate determinacy model, I set the prior of theta to be:
Code: Select all
theta,   , 1 , 1.35,beta_pdf, 1.2,  0.2, 1, 1.35;   


When estimate indeterminacy model, I set the prior of theta to be:
Code: Select all
theta,  , 1.35,  ,gamma_pdf, 1.5, 0.1, 1.35,   ;


So prior of theta only covers determinacy region in determinacy model, and only covers indeterminacy region in indeterminacy model(in this case ,I set the mean to be 1.5,larger than generally calibrated 1.2)
I am wondering if in both cases, the priors integrate to 1 so that I can make a model comparison? Is there anything obviously wrong here?

Thanks in advance.
Kindest regards,
Huan
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: determinacy model, prior covers both in/determinacy regi

Postby jpfeifer » Sun Mar 06, 2016 7:12 pm

If you are sure that in the respective regions there are no other reasons that the model solution cannot be computed/rejected, then you are fine. What you can do to test this is run the sensitivity command on the model to map the prior region.
Lastly, note that you do not need to provide lower and upper bounds when you are working with the generalized distributions, because they are redundant.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: determinacy model, prior covers both in/determinacy regi

Postby ZBCPA » Mon Mar 07, 2016 7:38 am

jpfeifer wrote:If you are sure that in the respective regions there are no other reasons that the model solution cannot be computed/rejected, then you are fine. What you can do to test this is run the sensitivity command on the model to map the prior region.
Lastly, note that you do not need to provide lower and upper bounds when you are working with the generalized distributions, because they are redundant.


Thanks very much. If I understand correctly, it is redundant to provide lower and upper bounds for Normal distribution;
it is redundant to provide upper bound for Gamma or Inverse Gamma distribution;
However, it is useful to provide lower and upper bounds for uniform or beta distribution;
it is useful to provide lower bound for Gamma or Inverse Gamma distribution,
Am I right? :roll:

Best regards,
Huan
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: determinacy model, prior covers both in/determinacy regi

Postby jpfeifer » Mon Mar 07, 2016 8:25 am

No.
Code: Select all
theta,  ,  ,  ,gamma_pdf, 1.5, 0.1, 1.35,   ;

already defines a generalized gamma distribution with lower bound 1.35. There is no point in providing an additional lower bound.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: determinacy model, prior covers both in/determinacy regi

Postby ZBCPA » Tue Mar 08, 2016 10:23 am

jpfeifer wrote:If you are sure that in the respective regions there are no other reasons that the model solution cannot be computed/rejected, then you are fine. What you can do to test this is run the sensitivity command on the model to map the prior region.
Lastly, note that you do not need to provide lower and upper bounds when you are working with the generalized distributions, because they are redundant.


Dear Johannes,
Sincerely thank you very much for your taking your much time answering me so many questions on this topic.
There is one issue I suddenly realized and hope to seek help from you again :mrgreen:

If I understand correctly ,to make model comparison, prior must integrate to 1, so model solution should be able to be computed in ANYWHERE in the prior region. In other words, to make a comparison between in/determinacy model, if I build a determinacy model with dynare, the prior must Not cover indeterminacy region; if I build a indeterminacy model (following Farmer JEDC 2015), the prior must Not cover determinacy region.
The issue is that I can Never find VERY EXACT bound between determinacy and indeterminacy. For example, I know when 1<theta<=1.355 the model is determinate, while theta >=1.3556 the model is indeterminate. So,the region 1.335<theta<1.336 must cover both indeterminacy and determinacy.
Under such circumstance , I am wondering if I can still make model comparison to see if the data favours indeterminacy or determinacy model, I can think of two cases to deal with it, but neither of those two cases is perfect.

CASE 1 to make prior integrate to 1, it seems that I have to ignore the possibility of theta falling in the region (1.355,1.356).
So when I estimate determinate model, I set prior region to be [1,1.355];
Code: Select all
theta,  ,  ,  ,beta_pdf, 1.3, 0.1, 1, 1.355;


When I estimate indeterminate model, I set prior region to be [1.356, infinity);
Code: Select all
theta,  ,  ,  ,gamma_pdf, 1.5, 0.1, 1.356,   ;

Then compare the log data density to see which model is more supported....

If CASE 1 is NOT OK,
how about CASE2, where priors together cover [1,infinity), however at the expense of broking "prior integrate to 1" rule-------prior of determinacy model covers a tiny region of indeterminacy, tinier than (1.355,1.356).

CASE 2
So when I estimate determinate model, I set prior region to be [1,1.356], ;
Code: Select all
theta,  ,  ,  ,beta_pdf, 1.3, 0.1, 1, 1.356;


When I estimate indeterminate model, I set prior region to be [1.356, infinity);
Code: Select all
theta,  ,  ,  ,gamma_pdf, 1.5, 0.1, 1.356,   ;


Could you tell me if Case1 or Case2 is fine or both wrong?
Best regards,
Huan
Last edited by ZBCPA on Tue Mar 08, 2016 10:32 am, edited 4 times in total.
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: determinacy model, prior covers both in/determinacy regi

Postby ZBCPA » Tue Mar 08, 2016 10:24 am

ZBCPA wrote:
jpfeifer wrote:If you are sure that in the respective regions there are no other reasons that the model solution cannot be computed/rejected, then you are fine. What you can do to test this is run the sensitivity command on the model to map the prior region.
Lastly, note that you do not need to provide lower and upper bounds when you are working with the generalized distributions, because they are redundant.


Dear Johannes,
Sincerely thank you very much for your taking your much time answering me so many questions on this topic.
There is one issue I suddenly realized and hope to seek f help from you again :mrgreen:

If I understand correctly ,to make model comparison, prior must integrate to 1, so model solution should be able to be computed in ANYWHERE in the prior region. In other words, to make a comparison between in/determinacy model, if I build a determinacy model with dynare, the prior Must not cover indeterminacy region; if I build a indeterminacy model (following Farmer JEDC 2015), the prior Must not cover determinacy region.
The issue is that I can Never find VERY EXACT bound between determinacy and indeterminacy. For example, I know when 1<theta<=1.355 the model is determinate, while theta >=1.356 the model is indeterminate. However, the region 1.355<theta<1.356 must cover both indeterminacy and determinacy.
Under such circumstance , I am wondering if I can still make model comparison to see if the data favours indeterminacy or determinacy model, since to make prior integrate to 1, it seems that I have to ignore the possibility of theta falling in the region (1.355,1.356). Let me refer this way to be CASE 1.
CASE 1
So when I estimate determinate model, I set prior region to be [1,1.355];
Code: Select all
theta,  ,  ,  ,beta_pdf, 1.3, 0.1, 1, 1.355;

When I estimate indeterminate model, I set prior region to be [1.356, infinity);
Code: Select all
theta,  ,  ,  ,gamma_pdf, 1.5, 0.1, 1.356,   ;

Then compare the log data density to see which model is more supported....

If CASE 1 is NOT OK,
how about CASE2, where priors together cover [1,infinity), however at the expense of broking "prior integrate to 1" rule-------prior of determinacy model covers a tiny region of indeterminacy, tinier than (1.355,1.356).

CASE 2
So when I estimate determinate model, I set prior region to be [1,1.356], ;
Code: Select all
theta,  ,  ,  ,beta_pdf, 1.3, 0.1, 1, 1.356;

When I estimate indeterminate model, I set prior region to be [1.356, infinity);
Code: Select all
theta,  ,  ,  ,gamma_pdf, 1.5, 0.1, 1.356,   ;


Could you tell me if Case1 or Case2 is fine or both wrong?

Best regards,
Huan
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: determinacy model, prior covers both in/determinacy regi

Postby jpfeifer » Sun Mar 13, 2016 11:33 am

This is a tricky question. What you could try to do is mapping the determinacy region by sampling from the prior and seeing how many draws were rejected. You can then rescale the marginal data density accordingly. In the unstable version, this can be done with the prior_function command.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: determinacy model, prior covers both in/determinacy regi

Postby ZBCPA » Wed Jul 20, 2016 6:08 am

jpfeifer wrote:During MCMC all proposed draws from the prior in the indeterminacy region will be rejected. Thus, the MCMC will be correct. However, you will have a problem in model_comparison because the prior does not integrate to 1 and the marginal data densities will be incorrectly computed as they assume a proper prior.


Dear Johannes,

Could I ask one more question about this?

In the AER paper "Testing for indeterminacy: an Application to US monetary Policy", the authors estimate both indeterminacy/determinacy models using a same prior distribution for a key parameter(psi1), and the prior region (mean=1.1, std=0.5) covers both indeterminacy(psi1<1) and determinacy(psi>1). They also compare the log data densities for each case. Since the prior does not integrate to 1, is there any problem with the model comparison results here?

Many thanks in advance,
Huan
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: determinacy model, prior covers both in/determinacy regi

Postby jpfeifer » Wed Jul 20, 2016 6:44 am

In this case, it is easy. If you know the boundary of indeterminacy region, you can just compute the cumulative prior density in the one part and the cumulative prior density in the other part and then scale the respective parts to integrate to 1 again for model comparison.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: determinacy model, prior covers both in/determinacy regi

Postby ZBCPA » Wed Jul 20, 2016 9:38 am

jpfeifer wrote:In this case, it is easy. If you know the boundary of indeterminacy region, you can just compute the cumulative prior density in the one part and the cumulative prior density in the other part and then scale the respective parts to integrate to 1 again for model comparison.


Thank you very much for your reply.

If I understand correctly, that is why the authors set prior distribution to make the probabilities of determinacy/indeterminacy are almost equal ( 0.527 VS 0.473) so that they directly compare the log data density and do not need to scale any part any more?
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: determinacy model, prior covers both in/determinacy regi

Postby jpfeifer » Wed Jul 20, 2016 10:50 am

No, that is why you need to know the share
( 0.527 VS 0.473)
so that you can scale.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: determinacy model, prior covers both in/determinacy regi

Postby ZBCPA » Sun Sep 18, 2016 5:32 am

jpfeifer wrote:No, that is why you need to know the share
( 0.527 VS 0.473)
so that you can scale.


Could I ask further about how to scale?

Could you please have a look attached pdf (1 page) from AER paper "Testing for Indeterminacy An application to US monetary Policy".
Even though their prior probability of Determinacy VS Indeterminacy is 0.527 VS 0.273,the authors do not scale the prior to make it integrate to 1 when calculate data densities, see equation (36). Does that mean they ignore the minor difference of prior probability between in/determinacy?

Or could you give me an example on how to scale in this case?

Many thanks,
Huan
Attachments
Testing for indeterminacy An application to US monetary policy -16-16.pdf
(175.02 KiB) Downloaded 76 times
ZBCPA
 
Posts: 101
Joined: Sat May 16, 2015 4:15 am

Re: determinacy model, prior covers both in/determinacy regi

Postby jpfeifer » Sun Sep 18, 2016 10:40 am

I haven't checked their computations completely, but I don't think so. Equation (16) they refer to explicitly makes sure that no prior truncation happens. That might be the trick.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

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