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: Scatterplot jitters - bug? (v12/Win used)


From   "Allan Reese (Cefas)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Scatterplot jitters - bug? (v12/Win used)
Date   Wed, 26 Jun 2013 14:30:55 +0000

In the example below, the points at (5 35.2) are jittered, and only (5 50.2) are plotted coincident.  You raise a good philosophical question: when jitter is requested, should the program extract the plotting ranges from the jittered data or the "true" values?  Also puzzling, I thought jitter added a random amount to each value, but repeated calls appear to give the same graph for this example, and -set seed- is also not changing the jittered plot.

Allan
PS: I assume you mean the Stata multiverse.

Date: Mon, 24 Jun 2013 15:10:10 +0100
From: Nick Cox <[email protected]>

Fair point, but somewhere in the Stata universe there is also an
anti-Allan who would regard it as a bug if data points were jittered
to outside the plot region.


On 24 June 2013 14:03, Allan Reese (Cefas) <[email protected]> wrote:
> Here's an irritating "feature" that I would term a bug, in that the results are not as per documentation and are counter-intuitive.  It seems that coincident points at the top-right limit of the plotted area are not jittered.  Here's a little, real, dataset and two examples to compare. Point at (5 50.2) are not jittered in the first plot.
>
> . list y x, sep(0)
>
>      +----------+
>      | y      x |
>      |----------|
>   1. | 0   44.7 |
>   2. | 0   44.7 |
>   3. | 0   44.7 |
>   4. | 0   39.9 |
>   5. | 1   39.9 |
>   6. | 0   39.9 |
>   7. | 3   35.2 |
>   8. | 5   35.2 |
>   9. | 5   35.2 |
>  10. | 5   50.2 |
>  11. | 5   50.2 |
>  12. | 3   50.2 |
>      +----------+
>
> . scatter y x, jitter(5)
>
> . scatter y x, jitter(5) yscale( range(0 5.2))
>
> Allan
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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