Regular imprecision or error in code?

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.

Regular imprecision or error in code?

Postby brown3c » Fri Apr 13, 2012 2:52 pm

I have a non-linear model with analytical steady states. I manually calculated the output in my model in the first period after the shock in two different ways that should be equivalent. Nonetheless I receive two slightly different results. How is that possible?

The function is a neoclassical production function:

Y=K^alpha(AL)^(1-alpha)

The shock, eA2, is a shock to labor productivity.

WAY NO1:
Y_ss+Y_eA2=3.839

WAY NO2:
K_ss^(alpha)*((A_ss+A_eA2)*(L_ss+L_eA2))^(1-alpha)=3.804


I really appreciate the help.

Kindest regards,
brown3c
brown3c
 
Posts: 6
Joined: Sun Sep 11, 2011 10:48 am

Re: Regular imprecision or error in code?

Postby bkjecn » Fri Apr 13, 2012 5:53 pm

If this period's capital stock can be determined this period, it could also move. Without the mod-file it is hard to say....

Also, you need to take the appropriate approximation to the model. Did you have Dynare linearize the model or solve it up to k-order? Your calculation in your post uses the fully non-linear model, which is not what was used to compute an impulse response from Dynare.
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am

Re: Regular imprecision or error in code?

Postby brown3c » Fri Apr 13, 2012 6:57 pm

Dear bkjecn,

Many thanks for the quick response. The code is for a 2-country 2 sector model and is a bit long, that is why I didn't include it. But it is attached to this meesage.

The capital stock was dated back one period. The approximation I took was:

stoch_simul(periods=2000, irf=40, order=1, nograph);

All I want is to get the correct level of output as a percentage of the steady state output in the 1st period after the shock. What would be the quickest way to do it in the non-linear model?

Is (Y_ss+Y_eA2(1,1))/Y_ss the correct percentage deviation?

Kind regards,
brown3c
Attachments
twocountry3.mod
(9.86 KiB) Downloaded 53 times
brown3c
 
Posts: 6
Joined: Sun Sep 11, 2011 10:48 am

Re: Regular imprecision or error in code?

Postby bkjecn » Fri Apr 13, 2012 8:25 pm

Capital is carried in from the last period, so the differences you are seeing are from the linearization of the model (order = 1 in stoch_simul). You will not get an exact solution to the non-linear model because of the approximation when solving for equilibrium. The output from Dynare is correct for the linearized model.

For a percentage deviation, I think you just want x / x_ss. The model gets written in terms of deviations from steady state, so if you take the deviation and divide by the steady state value, you should have percentages.
bkjecn
 
Posts: 35
Joined: Thu Oct 13, 2011 3:02 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 3 guests

cron