[R] pairs diagram of qq plots?

From: Dr. Stefan Reisner <stefan.reisner_at_syngenio.de>
Date: Mon, 21 Apr 2008 16:19:51 +0200


Hello everyone,  

for some exploratory analysis I would like to compare the distribution of an observable WERT pairwise between several samples identified by STICHPROBE (which differ in size).  

> str(stichproben_o1o4_20080327ff[c("STICHPROBE", "WERT")])
'data.frame': 6087 obs. of 2 variables:  $ STICHPROBE: num 9 9 2 2 7 3 2 3 8 6 ...  $ WERT : num 165 184 110 131 87 111 210 88 159 198 ...

A good way to compare two distributions is a Q-Q or Tukey mean-difference (tmd) plot. I would like to arrange these qq or tmd plots in a matrix as the pairs() function does.  

Can pairs() be made to immediately produce tmd plots instead of plain scatter plots, or will I have to do the tmd processing in a separate step and only pass the such preprocessed xy data to pairs()?  

Another problem is the representation of the data with respect to pairs(). My data.frame identifies the sample of each measurement in column STICHPROBE. It does not have one column for each sample (note again that the samples differ in size). From what I understand about pairs() it requires a separate column for each variable. The reshape() function should be able to change the representation but the best I can achieve is a "wide" dataframe with multiple columns (as desired) but no rows:  

> reshape(stichproben_o1o4_20080327ff[c("STICHPROBE", "WERT")],
timevar="STICHPROBE", direction="wide")
 [1] WERT.9 WERT.2 WERT.7 WERT.3 WERT.8 WERT.6 WERT.1 WERT.4 WERT.0 WERT.5 <0 rows> (or 0-length row.names)  

Best regards

Stefan  

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 21 Apr 2008 - 14:24:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Apr 2008 - 15:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive