setting priors following inverse gamma distribution

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.

setting priors following inverse gamma distribution

Postby earsmall » Fri Mar 11, 2016 6:13 am

Usually setting priors in estimation using dynare, we specify two parameters, mean and std.dev.
However, as for parameters following inverse gamma distributions (usually magnitude of shocks), the two are not mean and std.dev but two hyperparameters,s and nu.

As far as I know, the function below computes these two hyper parameters.

function [s,nu] = inverse_gamma_specification(mu, sigma2, lb, type, use_fzero_flag, name)

In my case, I implemented pre-sample analysis (AR-1) to have parameters of persistence and magnitude of shock.
The former is nothing but autoregressive coefficient (rho_x) but what about the latter?

Now, I want to compute s and nu by using the above function but do not know how to specify first two arguments, mu and sigma2.
Regarding mu, I could use std.dev of residuals obtained from the AR(1) estimates. But what about variance?

Is there any criterion in setting s and nu for parameters of the magnitude of shock?
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm

Re: setting priors following inverse gamma distribution

Postby jpfeifer » Fri Mar 11, 2016 6:49 am

Please explain what exactly you are trying to do. In the estimated_params-block all distributions including the inverse gamma are parameterized using mean and standard deviation. Dynare then internally computes the corresponding hyperparameters.

In the unstable version, the syntax is
Code: Select all
[p6,p7] = inverse_gamma_specification(mean,variance,lb, type, use_fzero_flag, name);
------------
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: setting priors following inverse gamma distribution

Postby earsmall » Fri Mar 11, 2016 6:57 am

In short, my questions are as follows.

1.If I want to set priors using dynare as below,

As for A_t = rho_A * A_(t-1) + epsilon_A where epsilon_A~N(0,Eps_A^2),

Code: Select all
estimated_params ;
...
...
stderr EPS_A,      starting_value,    lower_bound,   upper_bound,  INV_GAMMA_PDF,    p(1),    p(2)


I want to know whether p(1)=s and p(2)=nu which are hyperparameters of shape and scale or p(1)=mean and p(2)=std.dev.



2. Is there any usual way to set these two?
: If p(1)=mean and p(2)=std.dev,I think it is reasonable to set these two using standard deviation of residuals obtained by fitting AR(1), A_t = rho_A * A_(t-1) + epsilon_A. By doing so, I can set p(1).
As for p(2), i think it is ok to set half value of p(1).
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm

Re: setting priors following inverse gamma distribution

Postby jpfeifer » Fri Mar 11, 2016 7:29 am

1. As I said and as the manual clearly documents, you never provide hyperparameters. Hence,
p(1)=mean and p(2)=std.dev.


2. You are confusing the standard deviation of a shock with your uncertainty about this standard deviation, which is what you are trying to specify. You cannot use the in-sample standard deviation of shocks to specify the uncertainty about this value. Additionally, even if this were possible, you would not want to do this. The prior must be independent of the data.
------------
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: setting priors following inverse gamma distribution

Postby earsmall » Fri Mar 11, 2016 8:20 am

Thank you for your concrete posts.
It is very helpful.
earsmall
 
Posts: 40
Joined: Mon Jun 15, 2015 3:44 pm


Return to Dynare help

Who is online

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