Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: -kdensity- problem


From   Joerg Luedicke <[email protected]>
To   [email protected]
Subject   Re: st: -kdensity- problem
Date   Thu, 15 Mar 2012 11:50:06 -0700

Usually, the grid is wider than the range of the actual data points. I
am not sure which method -kdensity- uses but it is probably something
related to the bandwidth. It looks like you have a boundary at zero in
which case grid points below zero are not desired. I would recommend
using Ben Jann's -kdens-, available from SSC (-ssc des kdens-). With
-kdens- you can define lower and upper bounds for your density to be
estimated (see -help kdens- after installed).

J.

On Thu, Mar 15, 2012 at 9:38 AM, Ivica Rubil <[email protected]> wrote:
> Dear all,
>
> One of the options for -kdensity- is -generate(newvarx,newvard)- where newvarx will contain the points at which the density is estimated. After I run the command, part of these points are negative values in spite of the fact that the variable whose density I'm trying to estimate takes on positive values only (income). Can anyone tell me why is that so, and what can I do to fix it (if it needs to be fixed at all)?
>
> Ivica
>
>
>
> --
> Ivica Rubil
> Ekonomski institut || The Institute of Economics, Zagreb
> Trg J. F. Kennedyja 7, 10 000 Zagreb, Croatia
> tel. +385-1-2362-269 || fax. +385-1-2335-165
> [email protected] || www.eizg.hr
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index