[R] Question about which kind of plot to use

Jim Lemon jim at bitwrit.com.au
Thu Dec 20 07:58:56 CET 2007


Max wrote:
> Hi Everyone,
> 
> I've got a question about data representation. I have some psychometric 
> data with 5 scores for 15 different groups. I've been asked to show 
> some kind of mean plots. The data below is the mean and SD for a given 
> group, unfortunately my employer doesn't want me posting full datasets. 
> :(
> 
>  The groups V,W,X,Y,Z are divided into Bottom, (B), Middle (M) and Top 
> (T). An example of my data is shown below.
> 
> Score 1
> Mean				             SD
> 	B	    M	    T		    B	  M	    T
> V	86.9	13.0	88.8		16.9  2.0	10.5
> W	16.1	96.1	17.7		2.2	  4.6	1.7
> X	50.7	61.1	74.7		4.7	  3.7	7.6
> Y	68.5	99.7	37.6		6.0	  8.0	2.3
> Z	92.7	22.3	69.4		6.5	  1.2	2.2
> 
> What I did before was a standard mean plot:
> 
> plotMeans(w$score1, w$Factor, 
> error.bars="sd",xlab="Factor",ylab="Score",main="Group W Score 1 Plot")
> 
>  However, with 15 groups and 5 scores this turns into 75 individual 
> graphs. Is there a way to layer mean plots? Or show several mean plots 
> in the Same graph? Any ideas or suggestions would be great.
> 
Hi Max,
This may get a bit crowded, but brkdn.plot (plotrix) will do something 
like this. I think you would want your group variable as the "groups" 
argument (!) and the variable that specifies Bottom/Middle/Top as the 
"obs" argument. Pass "sd" as the "md" argument to get standard deviation 
bars.

Jim



More information about the R-help mailing list