Carl Witthoft
2012-Apr-03 22:06 UTC
[R] Looking for the name of a certain kind of quantile plot
Hi, While playing with quantile-quantile plots, I wrote up some code which plots something strangely different. Here's the pseudocode: testhist <- hist(sample_data) refhist <- hist(rnorm(n, mean=0,sd=1)) # for some large-ish n cumtest <- cumsum(testhist) cumref <- cumsum(refhist) plot(cumref,cumtest) This produces a straight line of slope 1 for a sample with the same parameters as the reference sample, and produces S-curves for samples with different sigmas. A sample with nonzero mean looks almost exponential (or logarithmic, depending on the sign of the mean). So my question is: is there a name for this sort of plot, and is it of any real use in statistical analysis? thanks. Carl -- Sent from my Cray XK6 "Quidvis recte factum, quamvis humile, praeclarum."
cberry at tajo.ucsd.edu
2012-Apr-04 15:55 UTC
[R] Looking for the name of a certain kind of quantile plot
Carl Witthoft <carl at witthoft.com> writes:> Hi, > While playing with quantile-quantile plots, I wrote up some code which > plots something strangely different. Here's the pseudocode: > > testhist <- hist(sample_data) > refhist <- hist(rnorm(n, mean=0,sd=1)) # for some large-ish n > cumtest <- cumsum(testhist) > cumref <- cumsum(refhist) > > plot(cumref,cumtest)Sounds like a 'pp-plot'. See http://en.wikipedia.org/wiki/P-P_plot Why not provide reproducible code? Chuck> > This produces a straight line of slope 1 for a sample with the same > parameters as the reference sample, and produces S-curves for samples > with different sigmas. A sample with nonzero mean looks almost > exponential (or logarithmic, depending on the sign of the mean). > > So my question is: is there a name for this sort of plot, and is it > of any real use in statistical analysis? > > thanks. > Carl-- Charles C. Berry Dept of Family/Preventive Medicine cberry at ucsd edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
Carl Witthoft
2012-Apr-05 00:15 UTC
[R] Looking for the name of a certain kind of quantile plot
Thanks, Chuck. That looks about right. And I would have provided repro code, but I was forced to write it in Matlab on account of corporate rules, and haven't translated to R yet. Carl Witthoft <carl at witthoft.com> writes: > Hi, > While playing with quantile-quantile plots, I wrote up some code which > plots something strangely different. Here's the pseudocode: > > testhist <- hist(sample_data) > refhist <- hist(rnorm(n, mean=0,sd=1)) # for some large-ish n > cumtest <- cumsum(testhist) > cumref <- cumsum(refhist) > > plot(cumref,cumtest) Sounds like a 'pp-plot'. See http://en.wikipedia.org/wiki/P-P_plot Why not provide reproducible code? Chuck > > This produces a straight line of slope 1 for a sample with the same > parameters as the reference sample, and produces S-curves for samples > with different sigmas. A sample with nonzero mean looks almost > exponential (or logarithmic, depending on the sign of the mean). > > So my question is: is there a name for this sort of plot, and is it > of any real use in statistical analysis? > > thanks. > Carl -- Sent from my Cray XK6 "Quidvis recte factum, quamvis humile, praeclarum."
Maybe Matching Threads
- filling the matrix row by row in the order from lower to larger elements
- Detect numerical series
- Loop Through Columns to Remove Rows
- [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method
- [PATCH 2/2] x86/vdso: Add VCLOCK_HVCLOCK vDSO clock read method