Skip to content
Advertisement

How can I find the value of kt+1 for periods t=1…50?

I know that: kt+1= (1−δ)kt + s * kθt s=0.08, δ=0.3, θ= 0.35, k0=2.5

I wrote this:

JavaScript

I want to calculate the value of k for periods 1,…,50 Of course, the result of my code is only for k1. Can you help me understand how I can find the values up to k50?

Advertisement

Answer

You can calculate it with a simple loop like this:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement