Page 1 of 1

Perturbation theory

PostPosted: Wed Oct 29, 2014 3:51 pm
by hewei2004
Hi I wonder how perturbation theory should affect the following:
I have a mod file in which I have written variables in two types are both present in the mod file.
type1.A variable that has been logged. And thus have equation of the form
exp(a)=exp(b)/exp(c)
type2. A variable that has not been logged. And thus have equation of the form
d=exp(e)/exp(f)

When I run dynare, I find that the first moment[mean] of some of the variables of type2 are NaN. I wonder if it is perturbation theory at work and I should have consistently turned all variables to type1.

The second observation is that , despite dynare not being able to calculate first moment, second moments are calculated and IRFs are successfully plotted in dynare.

Re: Perturbation theory

PostPosted: Wed Oct 29, 2014 4:10 pm
by jpfeifer
No, you can mix logged and not logged variables in perturbation. There must be something else wrong. Provide the files.

Re: Perturbation theory

PostPosted: Wed Oct 29, 2014 4:26 pm
by hewei2004
Not ready for public view, May I send it privately to your mannheim email address please?

Re: Perturbation theory

PostPosted: Wed Oct 29, 2014 4:26 pm
by jpfeifer
Yes.

Re: Perturbation theory

PostPosted: Thu Oct 30, 2014 9:11 am
by jpfeifer
Your model contains several unit roots. This explains the NaN. Some unconditional moments simply do not exist.

Regarding the file you sent me, the loop you wrote is extremely inefficient. Take a look at http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6141

Re: Perturbation theory

PostPosted: Thu Oct 30, 2014 4:20 pm
by hewei2004
Thank you.
Maybe the 3 unit roots is related to the 3 colinear relations found in model_diagnostics?
May I know how to remove the unit root in my two country model?

Re: Perturbation theory

PostPosted: Thu Oct 30, 2014 4:48 pm
by jpfeifer
Unit roots will always trigger a collinearity. Without knowing the model, it is impossible to tell where they come from.

Re: Perturbation theory

PostPosted: Fri Oct 31, 2014 3:25 am
by hewei2004
Can indeterminancy ie multiple solutions exist , cause unit root? Or unit root exclusively means a variable has trend?

Re: Perturbation theory

PostPosted: Fri Oct 31, 2014 11:08 am
by jpfeifer
Indeterminacy is a feature resulting from a particular solution. A unit root is part of the solution and thus cannot be caused by "indeterminacy". It could only be the other way round. The unit root means that at least one of your variables has a stochastic trend and will show permanent IRFs that do not go back to 0 even if irf=1000.