Kernel density estimation
-
- Member
- Posts: 42
- Joined: Wed Apr 06, 2011 8:20 am
Kernel density estimation
Hi, it is possible to create a Kernel density estimation in vensim DSS?
Re: Kernel density estimation
The short answer is yes.
However, there aren't any tools for this specific purpose, so it's up to you to develop and equation structure and optimization control file that will get the job done.
If you say a bit more about what you're trying to do, we may be able to be more helpful.
However, there aren't any tools for this specific purpose, so it's up to you to develop and equation structure and optimization control file that will get the job done.
If you say a bit more about what you're trying to do, we may be able to be more helpful.
/*
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
*/
-
- Member
- Posts: 42
- Joined: Wed Apr 06, 2011 8:20 am
Re: Kernel density estimation
Thanks for your help. Well, I need to create a kernel density function from a income matrix (each row is a incomne value, and the column is the year). So can you help me?
Re: Kernel density estimation
Are you trying to smooth across time, or income values, or both?
If this is all you're doing, you'd be better off using a stats package. But if this is part of a dynamic model, we can probably come up with a strategy that works.
Tom
If this is all you're doing, you'd be better off using a stats package. But if this is part of a dynamic model, we can probably come up with a strategy that works.
Tom
/*
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
*/
-
- Member
- Posts: 42
- Joined: Wed Apr 06, 2011 8:20 am
Re: Kernel density estimation
I need to calculate the density functions by income across time (one function for each period of time), and yes, it is a part of a dynamic model.
thanks again....
thanks again....
Re: Kernel density estimation
OK - I think this is actually fairly easy. I'll post an example.
One more question though: once you have the kernel-smoothed density, what will you do with it? For example, do you want to pick arbitrary points from it, or generate incomes at uniformly-spaced levels, essentially using the pdf as an interpolator? Or ... ?
One more question though: once you have the kernel-smoothed density, what will you do with it? For example, do you want to pick arbitrary points from it, or generate incomes at uniformly-spaced levels, essentially using the pdf as an interpolator? Or ... ?
/*
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: Kernel density estimation
Here's an example:
I haven't double checked to be sure that the resulting pdf integrates to 1, but it should be OK./*
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
*/
-
- Member
- Posts: 42
- Joined: Wed Apr 06, 2011 8:20 am
Re: Kernel density estimation
Thank you. I will check the example. Basically, after kernel-smoothed density, I need to pick a single level of income (each period of time), and then calculate how many people is below (or above) to this level of income....
Re: Kernel density estimation
OK. I think my example should work for you.
/*
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
*/