# Determinacy model, prior covers both in/determinacy region

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

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?

Best regards,
Huan

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:

When estimate indeterminacy model, I set the prior of theta to be:

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?

Kindest regards,
Huan

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.

[quote=“jpfeifer”]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.[/quote]

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?

Best regards,
Huan

No.

already defines a generalized gamma distribution with lower bound 1.35. There is no point in providing an additional lower bound.

[quote=“jpfeifer”]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.[/quote]

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

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];

``theta,  ,  ,  ,beta_pdf, 1.3, 0.1, 1, 1.355;``

When I estimate indeterminate model, I set prior region to be [1.356, infinity);

``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 [b] 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], ;

``theta,  ,  ,  ,beta_pdf, 1.3, 0.1, 1, 1.356;``

When I estimate indeterminate model, I set prior region to be [1.356, infinity);

``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

[quote=“ZBCPA”]

[quote=“jpfeifer”]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.[/quote]

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

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];

``theta,  ,  ,  ,beta_pdf, 1.3, 0.1, 1, 1.355;``

When I estimate indeterminate model, I set prior region to be [1.356, infinity);

``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 [b] tiny [/quote]

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], ;

``theta,  ,  ,  ,beta_pdf, 1.3, 0.1, 1, 1.356;``

When I estimate indeterminate model, I set prior region to be [1.356, infinity);

``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

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.

Dear Johannes,

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?

Huan

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.

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?

No, that is why you need to know the share

so that you can scale.