Page 1 of 1

How to calculate the difference in value for a variable in vensim over time?

Posted: Thu Mar 28, 2024 6:05 pm
by Susan@6
Hello, Sir/Madam. I am relativity new to vensim. I projected GDP data for 25 years and want to find the change in GDP each year. It seems unable to find a simple function that calculates the difference of a value for an auxiliary variable (GDP) in the current time with the value of that same var. (GDP) in the previous year.
Some function like this: Change in GDP= (GDP at time t - GDP at time t-1)? I need this as an auxiliary variable (Change in GDP).
Note: I have vensim PLE (Student Version).
It would be a great help if I could find a solution.
I appreciate any help you can provide. Thank You

Re: How to calculate the difference in value for a variable in vensim over time?

Posted: Thu Mar 28, 2024 6:16 pm
by tomfid
You can use DELAY FIXED for this:

Previous GDP = DELAY FIXED( Current GDP, one year, Current GDP ) ~ $/year
one year == 1 ~ year

In continuous time, you can use the SMOOTH function, i.e.
Previous GDP = SMOOTH( Current GDP, one year ) ~ $/year

You can also use the TREND function to compute a fractional rate of change on the same basis.

Re: How to calculate the difference in value for a variable in vensim over time?

Posted: Fri Mar 29, 2024 7:37 am
by Susan@6
Thank you so much for your kind help. It's working fine.