Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Truncating x-axis in kernel density graphs


From   SamL <[email protected]>
To   [email protected]
Subject   Re: st: Truncating x-axis in kernel density graphs
Date   Thu, 27 Nov 2003 05:56:26 -0800 (PST)

I'm not sure if this would work, but you can save the predicted values
from the smooth, and then plot those predicted values.  You should then be
able to use whatever graphics command you would generally use to truncate
the graph.

I don't know what you do to do the kernel density, for -lowess- I have
done the following to create the variable:

lowess y1 x, gen(predvalue1) nograph
lowess y2 x, gen(predvalue2) nograph
lowess y3 x, gen(predvalue3) nograph
.
.
.
lowess yJ x, gen(predvalueJ) nograph

Hope this helps.

Sam

On Thu, 27 Nov 2003, Ramani Gunatilaka wrote:

> Hi all, I am plotting kernel density functions of per capita household
> consumption for three years on the same graph. All three distributions
> are skewed to the left and have very long tails extending to the right.
> I would like to truncate the x axis at a certain consumption value so
> that the long tail is dropped and the area where all the action is,
> stretched across so that the changes are more visible. I have explored
> the graph scale options and Stata list archives but couldn't find
> anything that related to my particular problem.  If I were to specify a
> shorter range of consumption values than the entire data set, wouldn't
> it distort results? Would anyone be able to advise of any alternative?
> Thanks in advance, Ramani * * 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/
>
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index