Friday, February 03, 2006

Re: st: RE: kdensity with user defined kernel functions

That's interesting -- I was just going to write that you can dig into kdensity.ado to put in your own kernel... but you cannot, it is indeed in the executable. I think it used to be out there in ado files a version or two ago, so if you have previous reincarnations of Stata (I have my Stata 5 somewhere deep on the CD backups...), you can (i) copy kdensity.ado into a new file, say mykdens.ado; (ii) change the program name at the top; (iii) put your own kernel; (iv) see Stata crash...

On 2/3/06, Nick Cox <n.j.cox@durham.ac.uk> wrote: > At worst, I think you need to write everything > yourself. > > For speed (and possibly other reasons) the > hard work in -kdensity- is handed to part of > the executable and I can't see any hooks for > using your own kernel. So cloning -kdensity- > would get only part of the way there. > > Alternatively, Ben Jann's -kdens- package > seems more transparent. > > Nick > n.j.cox@durham.ac.uk > > D'Exelle Ben > > > I need to make a kernel density estimation with a kernel > > function that is not supported by the kdensity command. Is > > there a way to define your own specific kernel function > > within the kdensity command? If this is not possible within > > the kdensity command, is there another way to make kernel > > estimations with user-defined kernel functions? > > * > * For searches and help try: > * http://www.stata.com/support/faqs/res/findit.html > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ >

-- Stas Kolenikov http://stas.kolenikov.name

* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/


Tag:




<< Home

This page is powered by Blogger. Isn't yours?