Quantiles

Use this forum to post Vensim related questions.
Post Reply
marcow
Junior Member
Posts: 9
Joined: Fri Apr 18, 2008 1:51 pm

Quantiles

Post by marcow »

Does anybody know how to calculate the quantile of a variable in Vensim (PLE plus Version)?

I need to know under which value 5 % of the data of a certain variable are located.

Marco
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

This is done with the stats tool which is not available in PLE Plus. You can, of course, export the results and compute quantiles in another program.
beatrixb
Junior Member
Posts: 6
Joined: Sun Oct 19, 2014 12:35 am
Vensim version: PLE

Re: Quantiles

Post by beatrixb »

Is the stats tool available in any of the VenSim versions?
Administrator
Super Administrator
Posts: 4844
Joined: Wed Mar 05, 2003 3:10 am

Re: Quantiles

Post by Administrator »

The stats tool is only available in Pro/DSS.

You can easily export the contents of a window to Excel and do the stats there.
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/magazine-27509559
beatrixb
Junior Member
Posts: 6
Joined: Sun Oct 19, 2014 12:35 am
Vensim version: PLE

Re: Quantiles

Post by beatrixb »

Would it be easy to export and afterwards import that data? The whole point is to be able to do a calculate a quantile or inverse CDF and use it within the model I am running.
Administrator
Super Administrator
Posts: 4844
Joined: Wed Mar 05, 2003 3:10 am

Re: Quantiles

Post by Administrator »

No. Even with Vensim Pro/DSS, you might need to write an external function to do it.

Can you post the model and a description of what you are trying to do? If we have something to look at, we might be able to spot a way of doing it.
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/magazine-27509559
tomfid
Administrator
Posts: 3999
Joined: Wed May 24, 2006 4:54 am

Re: Quantiles

Post by tomfid »

Quantiles across an array dimension are fairly easy (using VECTOR RANK and similar). If you need time series quantiles, you can use an array dimension to store the time values, and get the quantiles from that.
beatrixb
Junior Member
Posts: 6
Joined: Sun Oct 19, 2014 12:35 am
Vensim version: PLE

Re: Quantiles

Post by beatrixb »

Sure. It is going to be a bit intense looking at first, but my focus is on the box labeled Supply Capacity. We are trying to input an equation for Supply Capacity using the inverse CDF or quantile function, where mu="Total Procurement of DMPA"/"Number of Manufacturers", sigma="Variability of Demand"/sqrt("Number of Manufacturers"), and k=("Price"-"Manufacturing Cost")/"Price".

Does that make any sense? If not let me know and I can try to clarify some more.
Attachments
public sector injectables model November 2014.mdl
(9.34 KiB) Downloaded 690 times
tomfid
Administrator
Posts: 3999
Joined: Wed May 24, 2006 4:54 am

Re: Quantiles

Post by tomfid »

It seems like there's too much integration going on here. Check the use of level vs. auxiliary variables. Adding units to this model would help verification. Also, embedded constants should generally be pulled out as separate, named variables, both for clarity and units checking.

I can concoct an example of array bins for quantiles separately, but it'll take a couple days because I'm traveling.
Post Reply