Uploading Data onto Vensim PLE
Uploading Data onto Vensim PLE
Hi there! I am having some trouble uploading data onto Vensim PLE.
My variables are in the type "data" because I am trying to run a timeseries excel sheet.
I have tried to convert the xlsx (excel) file to a .txt file, and then saving it as a .dat file.
The first row is the Time variable, with the subsequent rows being data of other variables.
Yet when I upload the .dat file, I receive the notification that there is no values to run in my file.
Could you kindly advise?
Thank you.
My variables are in the type "data" because I am trying to run a timeseries excel sheet.
I have tried to convert the xlsx (excel) file to a .txt file, and then saving it as a .dat file.
The first row is the Time variable, with the subsequent rows being data of other variables.
Yet when I upload the .dat file, I receive the notification that there is no values to run in my file.
Could you kindly advise?
Thank you.

 Super Administrator
 Posts: 3621
 Joined: Wed Mar 05, 2003 3:10 am
Re: Uploading Data onto Vensim PLE
Can you upload what you have so we can take a look?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
Re: Uploading Data onto Vensim PLE
HI!
Thank you for the response. I actually managed to figure that out earlier and am able to upload the data now into Vensim PLE.
However, I realized that when I simulate the program, I received the two error messages;
ERROR: The variable dlnrgdp and perhaps others require a data file be specified.
ERROR: Unable to correctly load in exogenous values  aborting.
I read previous posts and understand that I should use the "Lookup" as the Type, rather than "Auxillary" or "Level".
But when I do that, the simulation has an error: variable is a special type and cannot be used as a normal variable.
Could you kindly advise?
Thank you for the response. I actually managed to figure that out earlier and am able to upload the data now into Vensim PLE.
However, I realized that when I simulate the program, I received the two error messages;
ERROR: The variable dlnrgdp and perhaps others require a data file be specified.
ERROR: Unable to correctly load in exogenous values  aborting.
I read previous posts and understand that I should use the "Lookup" as the Type, rather than "Auxillary" or "Level".
But when I do that, the simulation has an error: variable is a special type and cannot be used as a normal variable.
Could you kindly advise?

 Super Administrator
 Posts: 3621
 Joined: Wed Mar 05, 2003 3:10 am
Re: Uploading Data onto Vensim PLE
If you can upload the model so we can see it, that would really help.
Otherwise, I'd advise a review of the help system on lookups, there is even a video to help you.
http://www.vensim.com/documentation/ind ... ?usr08.htm
Otherwise, I'd advise a review of the help system on lookups, there is even a video to help you.
http://www.vensim.com/documentation/ind ... ?usr08.htm
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
Re: Uploading Data onto Vensim PLE
Hi there!
Thank you so much for your prompt reply.
Attached is my model with the data input via a .dat file.
Thank you so much for your prompt reply.
Attached is my model with the data input via a .dat file.
 Attachments

 Rental Prices Sent.mdl
 (3.82 KiB) Downloaded 143 times
Re: Uploading Data onto Vensim PLE
Hi there!
This is another file, but with data uploaded via LOOKUP method.
Basically, I am trying to simulate the regression with 4 variables, whereby "fraction" represents the coefficients of variables, and the variables are all lagged in nature, hence the "DELAY FIXED" command.
Thank you so much once again!
This is another file, but with data uploaded via LOOKUP method.
Basically, I am trying to simulate the regression with 4 variables, whereby "fraction" represents the coefficients of variables, and the variables are all lagged in nature, hence the "DELAY FIXED" command.
Thank you so much once again!
 Attachments

 Rental Prices SentLOOKUPsent.mdl
 (4.12 KiB) Downloaded 137 times

 Super Administrator
 Posts: 3621
 Joined: Wed Mar 05, 2003 3:10 am
Re: Uploading Data onto Vensim PLE
I've made the changes to one of the lookups in the attached model.
 Attachments

 Rental Prices SentLOOKUPsent.mdl
 (4.4 KiB) Downloaded 175 times
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
Re: Uploading Data onto Vensim PLE
Hi there! Thank you so so much for all the help! The program now runs with the lookup command!!
I have encountered another issue  which is to simulate an endogenous variable into the model.
Here, the "rate of flow' variable IS the "lnrgdp" variable because it is an endogenous variable. Yet I received the error message that the variable is not a lookup, therefore cannot be simulated.
Could you kindly advise how I can deal with this?
Thank you so much! You have been a great source of help!
I have encountered another issue  which is to simulate an endogenous variable into the model.
Here, the "rate of flow' variable IS the "lnrgdp" variable because it is an endogenous variable. Yet I received the error message that the variable is not a lookup, therefore cannot be simulated.
Could you kindly advise how I can deal with this?
Thank you so much! You have been a great source of help!
 Attachments

 Rental Prices SentLOOKUPsent_sent.mdl
 (3.15 KiB) Downloaded 107 times

 Super Administrator
 Posts: 3621
 Joined: Wed Mar 05, 2003 3:10 am
Re: Uploading Data onto Vensim PLE
You've got
Is this correct?
Code: Select all
rate of flow = "l.lnavailstk Total"+"l.lnrgdp Total"
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
Re: Uploading Data onto Vensim PLE
The basic problem here is exactly what the error message suggests  that lnrgdp f is used as a lookup, but its equation suggests that it is an auxiliary depending on rate of flow.
I think this model is going to have problems, even if it runs.
There are two integrations between availStk and GDP > prices. It's not clear what the physical basis for them is. If the "total" variables are positive, prices will increase without bounds.
I think this needs a rethink. Assigning and balancing units would be a good start. Variables should have clear realworld interpretations, and the pricing process should probably use some kind of anchoring and adjustment, rather than an integration that floats without bounds.
I think this model is going to have problems, even if it runs.
There are two integrations between availStk and GDP > prices. It's not clear what the physical basis for them is. If the "total" variables are positive, prices will increase without bounds.
I think this needs a rethink. Assigning and balancing units would be a good start. Variables should have clear realworld interpretations, and the pricing process should probably use some kind of anchoring and adjustment, rather than an integration that floats without bounds.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Uploading Data onto Vensim PLE
To the administrator:
That is right! lnavailstk is an endogenous variable (therefore the loop from "rate of flow"), and lnrgdp is an exogenous variable.
"Rate of flow" here refers to the available stock that is carried into the next period.
Therefore, the regression equation that we are trying to simulate is
Period 1: lnavailstk_1 + lnrgdp_1 = rate of flow_1
Period 2: Rate of flow_1 + lnrgdp_2 = rate of flow_2
Period 3: Rate of flow_2 + lnrgdp_3 = rate of flow_3....
I realized that I made a mistake in my model for its arrows; here's the edited copy. Thank you!
To tomfid:
Thank you for the advice! I am not sure what "physical basis" refer to. But essentially I am trying to simulate the effects that the quantity of available stock of rental land (lnavailstk) and the current GDP (lnrgdp) of a country have on the "change in the quantity of rental land" (rate of flow). And then from there, how the (rate of flow) affects rental prices. My end goal is to find out the rental prices using the simulation. Is the explanation clearer?
That is right! lnavailstk is an endogenous variable (therefore the loop from "rate of flow"), and lnrgdp is an exogenous variable.
"Rate of flow" here refers to the available stock that is carried into the next period.
Therefore, the regression equation that we are trying to simulate is
Period 1: lnavailstk_1 + lnrgdp_1 = rate of flow_1
Period 2: Rate of flow_1 + lnrgdp_2 = rate of flow_2
Period 3: Rate of flow_2 + lnrgdp_3 = rate of flow_3....
I realized that I made a mistake in my model for its arrows; here's the edited copy. Thank you!
To tomfid:
Thank you for the advice! I am not sure what "physical basis" refer to. But essentially I am trying to simulate the effects that the quantity of available stock of rental land (lnavailstk) and the current GDP (lnrgdp) of a country have on the "change in the quantity of rental land" (rate of flow). And then from there, how the (rate of flow) affects rental prices. My end goal is to find out the rental prices using the simulation. Is the explanation clearer?
 Attachments

 Rental Prices SentLOOKUPsent_sent.mdl
 (3.23 KiB) Downloaded 94 times
Re: Uploading Data onto Vensim PLE
To model a lag, you can use DELAY FIXED in advanced version. If you're using Euler or Diff integration with a time step of 1, you can also use
lagged x = INTEG( (current x  lagged x)/TIME STEP, ... )
or
lagged x = SMOOTH( current x, TIME STEP)
To be blunt, the typical notation for vector autoregressive models in economics is a barrier to understanding. The SD approach to this problem would look more like the following.
lagged x = INTEG( (current x  lagged x)/TIME STEP, ... )
or
lagged x = SMOOTH( current x, TIME STEP)
To be blunt, the typical notation for vector autoregressive models in economics is a barrier to understanding. The SD approach to this problem would look more like the following.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Uploading Data onto Vensim PLE
Thank you for the model, Tom. The only issue I have is the data inputs are not as readily available.
This is my whole model, and you will see what I mean. I wanted to understand if I simulated the endogenous variables correctly.
Could you kindly advise?
This is my whole model, and you will see what I mean. I wanted to understand if I simulated the endogenous variables correctly.
Could you kindly advise?
 Attachments

 Rental Prices Take 7A.mdl
 (8.58 KiB) Downloaded 120 times
Re: Uploading Data onto Vensim PLE
This looks much better. To follow SD conventions, I'd use something other than a box to identify the 4 "total" variables, since they are (correctly) no longer stocks (INTEG). I obviously can't speak to the numerical details, but this seems like a reasonable structure.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Uploading Data onto Vensim PLE
Sounds great! Thank you for the advice Tom!
Do you know if Vensim allow momentum (ie lagged variables that are endogenous in nature) in system dynamics (SD)?
Thank you once again!
Do you know if Vensim allow momentum (ie lagged variables that are endogenous in nature) in system dynamics (SD)?
Thank you once again!
Re: Uploading Data onto Vensim PLE
Yes.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Uploading Data onto Vensim PLE
If you want to use econometric notation directly, you're probably better off to use R. But you can implement lags directly in Vensim. Generically, if you have something like
deltaC(t) = C(t)C(t1) = .5*Y(t)  .2*(C(t1).9*Y(t1)) + expsilon
(the ECM at http://en.wikipedia.org/wiki/Error_correction_model)
This can be rearranged to:
C(t) = C(t1) + .5*Y(t)  .2*(C(t1).9*Y(t1)) + epsilon
which is implemented in Vensim something like:
C = Lagged C + .5*Y  .2*(Lagged C  .9*Lagged Y) + epsilon
Lagged C = DELAY FIXED(C,one year)
Lagged Y = DELAY FIXED(Y,one year)
TIME STEP = 1~~year
one year == 1~~year
epsilon = RANDOM ...
If you want a comprehensible, robust, continuous time notation model, it's better to switch to standard SD stock and flow notation. Hidden problems lurk in many dynamic economic models. For a classic example of the hidden problems in the multiplieraccelerator, similar to the above, see
http://www.systemdynamics.org/conferenc ... low337.pdf
deltaC(t) = C(t)C(t1) = .5*Y(t)  .2*(C(t1).9*Y(t1)) + expsilon
(the ECM at http://en.wikipedia.org/wiki/Error_correction_model)
This can be rearranged to:
C(t) = C(t1) + .5*Y(t)  .2*(C(t1).9*Y(t1)) + epsilon
which is implemented in Vensim something like:
C = Lagged C + .5*Y  .2*(Lagged C  .9*Lagged Y) + epsilon
Lagged C = DELAY FIXED(C,one year)
Lagged Y = DELAY FIXED(Y,one year)
TIME STEP = 1~~year
one year == 1~~year
epsilon = RANDOM ...
If you want a comprehensible, robust, continuous time notation model, it's better to switch to standard SD stock and flow notation. Hidden problems lurk in many dynamic economic models. For a classic example of the hidden problems in the multiplieraccelerator, similar to the above, see
http://www.systemdynamics.org/conferenc ... low337.pdf
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Uploading Data onto Vensim PLE
Where the lag is one period (i.e. one TIME STEP) and you're using Euler or Diff integration, you can also write:
Lagged C = SMOOTH(C,one year)
or
Lagged C = INTEG((CLagged C)/one year,one year)
Lagged C = SMOOTH(C,one year)
or
Lagged C = INTEG((CLagged C)/one year,one year)
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Uploading Data onto Vensim PLE
Thank you for the advice Tom.
I have done the following and have a few follow up questions.
1) Static vs Dynamic models
Because the Vensim PLE does not have a calibration feature, I used a statistical software to churn out the coefficients to input into Vensim. The problem is the statistical software like STATA is static in nature, which means I input the actual data into the regression to churn out the results for the dependent variable. For Vensim on the other hand, I input the data for the exogenous independent variables, and let the data for the endogenous variable (which is a lagged form of the dependent variable) be input by the looping arrows from the dependent variable. Will Vensim and STATA then give me different dependent variable values?
2) If they do NOT give me different outputs, then here's another question. When dealing with a variable with 2 time periods lag, STATA drops the variable in period t2 and t1, and only includes it from period t onwards. Vensim on the other hand does not seem to do that, therefore I was wondering whether I am able to MANUALLY key in the data for the first 2 period t2 and t1, before running the program.
Thank you for your advice!
I have done the following and have a few follow up questions.
1) Static vs Dynamic models
Because the Vensim PLE does not have a calibration feature, I used a statistical software to churn out the coefficients to input into Vensim. The problem is the statistical software like STATA is static in nature, which means I input the actual data into the regression to churn out the results for the dependent variable. For Vensim on the other hand, I input the data for the exogenous independent variables, and let the data for the endogenous variable (which is a lagged form of the dependent variable) be input by the looping arrows from the dependent variable. Will Vensim and STATA then give me different dependent variable values?
2) If they do NOT give me different outputs, then here's another question. When dealing with a variable with 2 time periods lag, STATA drops the variable in period t2 and t1, and only includes it from period t onwards. Vensim on the other hand does not seem to do that, therefore I was wondering whether I am able to MANUALLY key in the data for the first 2 period t2 and t1, before running the program.
Thank you for your advice!
Re: Uploading Data onto Vensim PLE
You should get the same answer either way. The values in the first two time steps won't be established by the data, but as long as you initialize the lag states to a reasonable value, they should be fine. Or you could just start the model at time 2.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Uploading Data onto Vensim PLE
Hi,
I am having the same issue as Ich93lily.
Vensim keeps telling me the following error:
ERROR: The variable FIT DATA and perhaps others require a data file be specified.
ERROR: Unable to correctly load in exogenous values  aborting.
I compared my model to the revised model the administrator sent back to Ich93lily. However, I cannot find the error or how to correct it.
May you advise what's wrong with my lookup and how to correct the error? I would like to have the lookup "DATA" separate from the variable "FIT degression rate" to make it clearer that one variable returns the value of the lookup.
Thank you in advance! I attached the model.
I am having the same issue as Ich93lily.
Vensim keeps telling me the following error:
ERROR: The variable FIT DATA and perhaps others require a data file be specified.
ERROR: Unable to correctly load in exogenous values  aborting.
I compared my model to the revised model the administrator sent back to Ich93lily. However, I cannot find the error or how to correct it.
May you advise what's wrong with my lookup and how to correct the error? I would like to have the lookup "DATA" separate from the variable "FIT degression rate" to make it clearer that one variable returns the value of the lookup.
Thank you in advance! I attached the model.
Re: Uploading Data onto Vensim PLE
Normally you would specify the data file in the Data Sources... field, on the Advanced tab of the simulation control dialog (Model>Simulate menu).
However, PLE doesn't do data variables, so you'd have to use another lookup.
However, PLE doesn't do data variables, so you'd have to use another lookup.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Uploading Data onto Vensim PLE
Hi Tomfid,
Thanks for your quick reply.
Would you mind explaining how to solve this issue with another lookup in Vensim PLE? What kind of lookup?
Thank you!
Thanks for your quick reply.
Would you mind explaining how to solve this issue with another lookup in Vensim PLE? What kind of lookup?
Thank you!

 Super Administrator
 Posts: 3621
 Joined: Wed Mar 05, 2003 3:10 am
Re: Uploading Data onto Vensim PLE
Have you looked at the help on lookups?
http://www.vensim.com/documentation/lookups.htm
http://www.vensim.com/documentation/lookups.htm
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine27509559
Re: Uploading Data onto Vensim PLE
It would be exactly the same structure as you have for FIT Degression Rate.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/