Only in the marginal sense, the total differential is a linear approximaion to the function. So the derivative in the direction of the s of two shocks will be a sum of the two derivatives, but (C) will not be equalt to (A)+(B), since it is a nonlinear function in the shock variances. Ondra K. On Feb 18, 2008 5:55 AM, Rhee, Dong-Eun wrote: Dear Mr. Ondra Kamenik, I deeply appreciate your helps! If (A)+(B) is not (C), what did you mean by "since it is marginal, you can assume that it will sum up to the variances?" My model has five shocks... It's somewhat complicated one. Sincerely, Dong-Eun Rhee Quoting Ondra Kamenik : > Dear Dong-Eun, > > It suffices to calculate (i), (ii) and (iii). The (iv) case is not needed > and of course (A)+(B) will not be (C) since it is non-linear. > > You have to be careful to obtain estimates of variance very preciselly. Note > that the error in these estimates acccumulates if you want to calculate the > total differential. > > It might happen in theory that increasing a variance of a shock is > decreasing a variance of some variable. I can imagine that in some > non-linear optimal portfolio problem, increasing a variance of some > dividends might cause abandoning some asset for smoothing income so its > variance goes to zero. The asset might be abandoned because of unsuitable > correlation structure of its dividend with other assets. > > How many predetermined variables does your model have? I am thinking of > implementing m-order accurate theoretical estimates of the n first moments > based on k-order approximation. However, this method would be practical only > for smaller models. On the other hand it would faciliate calculations like > you want to do. > > Ondra K. > > On Feb 17, 2008 11:28 PM, Rhee, Dong-Eun wrote: > >> >> Dear Mr. Ondra Kamenik, >> >> Hello. >> >> I'm Dong-Eun in Indiana University-Bloomington, again. >> >> I'm interested in calculating "total differential at the calibrated >> variances of the shocks," as you suggested as a substitute for the >> variance decomposition of the nonlinear approximated model. >> >> Please see if I understand your method correctly: >> >> (1) >> Suppose I have two shocks in my model, say s1 and s2, and the >> calibrated variance is s1=0.001 and s2=0.000004. Then to get the >> "slited perturbed" variance, I need to increase each variance by the >> same amount, say 0.000001. Then, I run dynare++ in four times: >> (i) s1=0.001 and s2=0.000004 (baseline) >> (ii) s1=0.001001 and s2=0.000004 (perturbed s1) >> (iii) s1 = 0.001 and s2=0.000005 (perturbed s2) >> (iv) s1 = 0.001001 and s2=0.000005 (perturbed s1 and s2) >> >> Then, if I'm interested in an endogenous variable, say x, I need to >> calculate >> >> (A) change in the variance x between (i) and (ii) >> (B) change in the variance x between (i) and (iii) >> (c) change in the variance x between (i) and (iv) >> >> Then do you mean that (A) + (B) should be (C)? >> >> (2) >> >> What if a change in the variance of a shock reduce the variance of an >> endogenous variable? >> >> Please let me know your answer.. >> >> I appreciate your helps!! >> >> Sincerely, >> Dong-Eun Rhee >> >> >> > Ad 1: Don't know. Ask Michel, or better dynare4 forum., or look into the code. I suspect that the variance decomp is only linear. Ad 2: Yes, if the model is non-linear, irfs are different (basically they are not symmetric anymore) and most importantly, the definition of the irf is changed, since IRF as a notion was developped in VAR linear models, so we have to accomodate the definition to non-linear world. Read the tutorial for the IRF definition. Ondra K. - Hide quoted text - On Feb 12, 2008 9:52 AM, Rhee, Dong-Eun wrote: Dear Ondra Kamenik, I really appreciate your very detailed answer. It was very helpful for me to understand this issue. I have a few more questions. (1) I know that Dynare v4 is generating "variance decomposition" in case of stoc_simul even in the 2nd order approximation. Do you know how it avoid the problems from non-linearity as you mentioned? (2) Do the non-linearity affect the impulse-responses also? Then is there any differences between the irf in the linear model and that of non-linear model? Thank you very much. Sincerely, Dong-Eun Rhee Quoting Ondra Kamenik : > Dear Dong-Eun, > > dynare++ is designed to solve non-linear models. In the non-linear world, it > does not hold that the variance of a variable is a convex combination of > variances of the shocks, simply because of the non-linearity. This implies > that one cannot decompose the variances as it was done in VAR literature. > > In other words, the contributions of individual shocks do not sum up to the > total variance. Moreover, one is not able to calculate even contributions of > the individual shocks, since for example the fourth moment X^2Y^2 for > uncorrelated shocks X and Y has variance var(X)*var(Y). If var(X)=0 or > var(Y)=0, then E[X^2Y^2] is zero and the effect of X^2Y^2 will be lost if > you shut-off X or Y. > > Another reason is that the equilibrium has for individual shocks different > dynamics (agents behave very differently if they face different sources of > uncertainity), and these cannot be summed up. > > The only mathematically correct way is to calculate non-linear function > whose inputs are variances of the shocks and outputs are variances of the > variables, and calculate its total differential (linear approximation) at > zero shocks (to be somewhat close to classical variance decomposition). > However, one has to be careful how to interpret this, since the perfect > foresight equilibrium is far from the economy of the interest. > > You can even calculate the total differential at the calibrated variances of > the shocks, this will have to be interpreted as how individual shocks > marginally contribute to the variable variances, and since it is marginal, > you can assume that it will sum up to the variances. (The total differential > as a linear approximation to the function). However, this cannot be called > variance decomposition at all. > > The total differential can be calculated by running dynare++ with slightly > perturbed variances of the shocks. > > If your supervisor wants you to do some variance decomposition, please ask > him to tell me what he means by this, I might be missing something > fundamental. And I can then implement it in dynare++. > > regards, > > Ondra K. > > On Feb 12, 2008 7:53 AM, Rhee, Dong-Eun wrote: > >> >> Dear Mr. Ondra Kamenik, >> >> Hello. This is Dong-Eun Rhee in Indiana University-Bloomington. >> I'm writing this email to ask you helps on Dynare++, again. >> >> As far as I know, Dynare++ does not automatically produce the >> information on the variance decomposition. Am I right? Then, could you >> let me know how to implement the variance decomposition in Dynare++? If >> you have some basic code on it, could you let me see it? >> >> Any helps would be highly appreciated. Thank you. >> >> Sincerely, >> Dong-Eun Rhee >> >> >> >