[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Jann, Ben" <ben.jann@soz.gess.ethz.ch> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: RE: how to control jitering in scatter plots |

Date |
Wed, 6 Aug 2003 11:07:09 +0200 |

Thanks for your reply, Nick. Maybe I didn't express myself clear enough. What I expected was that . set seed 3562 . scatter y x, jitter(2) . set seed 3562 . scatter y x, jitter(2) would produce two identical graphs, just as . set seed 3562 . gen v1=uniform() . set seed 3562 . gen v2=uniform() produces two identical variables. This, however, is not the case. Ergo, the jitering does not seem to depend on the seed (unless I miss something here). Of course, Nick's solution (creating random perturbations outside -scatter-) would work. I just thought it would be nice to have full control over the jitering-option without having to use a backdoor. And, by the way, I am really curious how the jitering is determined if not by the seed. (because I feel commited to the scientific reproducability policy ... although this might be splitting hairs in this case) ben > -----Ursprüngliche Nachricht----- > Von: Nick Cox [mailto:n.j.cox@durham.ac.uk] > Gesendet: Dienstag, 5. August 2003 17:59 > An: statalist@hsphsun2.harvard.edu > Betreff: st: RE: how to control jitering in scatter plots > > > Ben Jann > > > > Does anyone know how the random noise generator of the > > jitering option in scatter plots can be controlled (Stata 8 > > and/or 7). I'd like to produce a series of related graphs > > for didactical purposes. The data points are always the > > same, however, some other stuff changes from graph to > > graph. It would be really nice if the data points would be > > jittered *exactly* the same way in each graph. (Up to now, > > I just produced one graph with everything in it, and then > > manually deleted whatever wasn't needed by editing the eps-file.) > > > > My first guess was, that the jittering depends on the seed. > > So I tried: > > > > set seed ... > > scatter ... > > > > This doesn't work, however. > > I guess that the jittering does depend on > the seed, but it won't remain constant > from graph to graph, any more than you > get the same sample of random numbers > repeatedly even if the seed remains unchanged. > > For your purposes, I think you will need to produce > one or more sets of random perturbations outside > -scatter- and then add to your variables. To > ensure that the perturbed variables have the > same variable labels, value labels, format, > etc. as your originals, there are various commands, among which > -copydesc- on SSC is in the public domain. > > Nick > n.j.cox@durham.ac.uk > * > * 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/

- Prev by Date:
**st: Omar Arias/Person/World Bank is out of the office.** - Next by Date:
**st: Re: ivreg2 use** - Previous by thread:
**st: Omar Arias/Person/World Bank is out of the office.** - Next by thread:
**Re: st: AW: RE: how to control jitering in scatter plots** - Index(es):

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