Kernel density estimation

Use this forum to post Vensim related questions.
Post Reply
luisangelguzmang
Member
Posts: 42
Joined: Wed Apr 06, 2011 8:20 am

Kernel density estimation

Post by luisangelguzmang »

Hi, it is possible to create a Kernel density estimation in vensim DSS?
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Kernel density estimation

Post by tomfid »

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.
luisangelguzmang
Member
Posts: 42
Joined: Wed Apr 06, 2011 8:20 am

Re: Kernel density estimation

Post by luisangelguzmang »

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?
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Kernel density estimation

Post by tomfid »

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
luisangelguzmang
Member
Posts: 42
Joined: Wed Apr 06, 2011 8:20 am

Re: Kernel density estimation

Post by luisangelguzmang »

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....
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Kernel density estimation

Post by tomfid »

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 ... ?
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Kernel density estimation

Post by tomfid »

Here's an example:
kernel density.mdl
(3.7 KiB) Downloaded 220 times
I haven't double checked to be sure that the resulting pdf integrates to 1, but it should be OK.
luisangelguzmang
Member
Posts: 42
Joined: Wed Apr 06, 2011 8:20 am

Re: Kernel density estimation

Post by luisangelguzmang »

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....
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Kernel density estimation

Post by tomfid »

OK. I think my example should work for you.
Post Reply