bayesian 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.

bayesian estimation

Postby riiiiad » Tue Mar 08, 2016 9:54 pm

hi sir
i estimate a model with a bayesian estimation and i attached 03 files about diagnostic
please can i have your opinion on the result
thank you
Attachments
posterior mean.pdf
(8.25 KiB) Downloaded 94 times
Historical and smothed variable.pdf
(8.17 KiB) Downloaded 96 times
Multivariate convergence diagnostic.pdf
(5.49 KiB) Downloaded 114 times
riiiiad
 
Posts: 14
Joined: Mon Jan 12, 2015 9:09 pm

Re: bayesian estimation

Postby jpfeifer » Thu Mar 10, 2016 10:30 am

Your MCMC seems to not have converged. At a minimum, you need more draws. Also, how did you treat your data. Some observables look extremely smooth.
------------
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: bayesian estimation

Postby riiiiad » Thu Mar 10, 2016 4:15 pm

thank you for your reply
i have used the detrended series (gdp,c,inv,i,...) with hp filter .then how can i have more draw.
thank you
riiiiad
 
Posts: 14
Joined: Mon Jan 12, 2015 9:09 pm

Re: bayesian estimation

Postby jpfeifer » Thu Mar 10, 2016 4:36 pm

Increase
Code: Select all
mh_replic

You should never use the HP filter for Bayesian estimation. Please see Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf
------------
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: bayesian estimation

Postby riiiiad » Thu Mar 10, 2016 5:06 pm

ok i will use the log first difference and i will send you the results
thanks
riiiiad
 
Posts: 14
Joined: Mon Jan 12, 2015 9:09 pm

Re: bayesian estimation

Postby riiiiad » Fri Mar 11, 2016 9:01 am

good morning
i have simulate my model with bayseian estimation
my model is log lineared and i calculated the steady state value. the variables y_hat,c_hat,inv_hat,i_hat,picz_hat,P_hat and ca_y_hat are the devaiation about steady state
i use data contain
y:gdp
c:consumption
inv:investment
i=nominan interest
picz:core inflation
p:price of oil
ca_y: current account gdp ratio

i make a transformation as following
y,c,inv : the first differnec og logarithm: ln(y)-ln(y-1)
i: no transformation
picz: is expressed as deviation from its target
p:the first differnec og logarithm: ln(y+1)-ln(y)
ca_y: no transformation

and i estimate the model and i put
y_hat=ln(y)-ln(y-1)
c_hat=ln(c)-ln(c-1)
inv_hat=ln(inv)-ln(inv-1)
p_hat=ln(p)-ln(p-1)
i_hat=i
picz_hat=picz
ca_y_hat=ca_y

i have the multivariate diagnostic as attached

a have another question i want to compare the standard deviation of real gdp and the gdp of model (théorical moment)
for model there is no problem, i take the théorical moment about the oo file
for real data, do i filtred the serie with hp filter(1600) and compute the standard deviation about demeanded series.
thankd
Attachments
muultivariate convergenec.pdf
(5.23 KiB) Downloaded 96 times
riiiiad
 
Posts: 14
Joined: Mon Jan 12, 2015 9:09 pm

Re: bayesian estimation

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

1. Your general approach for the observation equations is correct.
2. Make sure your interest rate and inflation data are consistent (net vs. gross and annual vs. quarterly)
3.
p:the first differnec og logarithm: ln(y+1)-ln(y)

is clearly not correct
4. For comparing moments, you need to use the same filter. If you use the HP-filter to compute theoretical moments and in the data, you are fine. Note, however, that it is more common to compare the standard deviations of growth rates if you estimate your model on growth rates.
------------
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: bayesian estimation

Postby riiiiad » Sun Mar 13, 2016 4:41 pm

hi professor
thank you for your post
1-I'm confused about your answer in: viewtopic.php?f=1&t=7950
please can you explain me more clearly
2-how i use (the command) the HP filter to estimate the théorical moment
thank you again
riiiiad
 
Posts: 14
Joined: Mon Jan 12, 2015 9:09 pm

Re: bayesian estimation

Postby jpfeifer » Mon Mar 14, 2016 8:12 pm

1. Please reply in that post by clarifying your question as I asked.
2. By specifying the
Code: Select all
hp_filter
option of the stoch_simul command (see the manual)
------------
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: bayesian estimation

Postby riiiiad » Mon Mar 14, 2016 8:53 pm

i am asking if i can match observable variable in the data like ΔlnYt to the model variable (y_hat).
y_hat is fractional deviations from it steady state value. my model is log linearzed.
Yt is real gdp.
thanks
riiiiad
 
Posts: 14
Joined: Mon Jan 12, 2015 9:09 pm

Re: bayesian estimation

Postby jpfeifer » Tue Mar 15, 2016 7:33 am

Obviously, you cannot do this. You cannot match growth rates in the data (ΔlnYt) to percentage deviations from trend in the model (y_hat). You need to match them to the growth rates of the model variables (and to account for the mean in growth rates).
------------
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: bayesian estimation

Postby riiiiad » Wed Mar 16, 2016 8:16 pm

ok professor
I did what you told me and I think I have very good result (acceptance current ratio 24.5%)
and i had a théorical moment for my variable (ex sigma y_hat=10)
and i want to compare this standard deviation (sigma y_hat) with the standard déviation of the data.
how i compute the standard deviation of y in my data. is it the standard déviation of filtred gdp with hp filter?
thanks
riiiiad
 
Posts: 14
Joined: Mon Jan 12, 2015 9:09 pm

Re: bayesian estimation

Postby jpfeifer » Thu Mar 17, 2016 8:50 am

No, you can only compare the model variables to corresponding objects you observe in the data. You do not observe y_hat, only it's growth rate. For this reason you can only compare these two,
------------
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: bayesian estimation

Postby ZBCPA » Fri Mar 18, 2016 5:50 am

jpfeifer wrote:No, you can only compare the model variables to corresponding objects you observe in the data. You do not observe y_hat, only it's growth rate. For this reason you can only compare these two,


Dear Johannes,

If data is in growth rate, model is log linearized, and there is measurement error,
Code: Select all
y_obs=y-y(-1)+y_ME
;

Then should we compare the standard deviation of data with standard deviation of Model y_obs,which of course includes y_ME;

Or
should we compare the standard deviation of data with standard deviation of Model y-y(-1) ?
Even though they are very similar.

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

Re: bayesian estimation

Postby jpfeifer » Fri Mar 18, 2016 8:16 am

In the data you only observe the variable including measurement error. Thus, y_obs is the natural object of 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


Return to Dynare help

Who is online

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