Re: [R] Lattice barchart with error bars

2013-07-08 Thread S Ellison
> > Anyone know what the 95% confidence > > interval of the median would be? For an R answer you could get one for each group from wilcox.test( , conf.int =TRUE ) and build that into an alternative boxplot stats function which you could specify in your bwplot call. Steve Ellison

Re: [R] Lattice barchart with error bars

2013-07-05 Thread Bert Gunter
This is not an R question. Read the references. Bert Sent from my iPhone -- please excuse typos. On Jul 5, 2013, at 12:15 PM, Shaun Jackman wrote: > Hmm. Interesting point, Bert. I don't know whether the notches show > the 95% confidence interval or the median, or the 95% confidence > interva

Re: [R] Lattice barchart with error bars

2013-07-05 Thread Shaun Jackman
Hmm. Interesting point, Bert. I don't know whether the notches show the 95% confidence interval or the median, or the 95% confidence interval that two non-overlapping notches have different medians. You're saying it's the latter? Anyone know what the 95% confidence interval of the median would be?

Re: [R] Lattice barchart with error bars

2013-07-05 Thread Shaun Jackman
Yes! Thank you, David. That's exactly what I'm I'm looking for. For the record, here's a couple pages leading to this answer: http://www.hep.by/gnu/r-patched/r-faq/R-FAQ_89.html http://latticeextra.r-forge.r-project.org/man/segplot.html http://rgm3.lab.nig.ac.jp/RGM/r_function?p=latticeExtra&f=seg

Re: [R] Lattice barchart with error bars

2013-07-05 Thread Bert Gunter
Be careful! You are talking about 2 different varieties of apples here. As I read it, the CI's in the cancer data, which I know is just for example purposes, are CI's for the **individual means**; the notches in boxplots are nonparametric and for 2 groups with roughly equal sample sizes, "The ide

Re: [R] Lattice barchart with error bars

2013-07-05 Thread David Winsemius
On Jul 5, 2013, at 11:15 AM, Shaun Jackman wrote: > Hi Bert, Dennis, > > I'll agree that using a barchart was a poor choice. I was in fact using a > notched bwplot to show the median and confidence interval of the median. In > this case it's the median and confidence interval that I want to high

Re: [R] Lattice barchart with error bars

2013-07-05 Thread Shaun Jackman
Hi Bert, Dennis, I'll agree that using a barchart was a poor choice. I was in fact using a notched bwplot to show the median and confidence interval of the median. In this case it's the median and confidence interval that I want to highlight, and I find that the visual noise of the box and whisker

Re: [R] Lattice barchart with error bars

2013-07-04 Thread Bert Gunter
Shaun: I understand that this type of plot is standard in many disciplines, but it really is awful (google on 'Dynamite plots' for some more erudite perspectives). Have you considered bwplot() for your unaggregated data instead? (No need to reply. It's July 4, and I'm just waving a little flag fo

[R] Lattice barchart with error bars

2013-07-04 Thread Shaun Jackman
Hi, I'd like to draw a lattice barchart of means with error bars to show the standard deviation. I have the barchart, how do I add the error bars? require(datasets) require(lattice) x <- aggregate(weight ~ Diet, ChickWeight, function(x) c(mean=mean(x), sd=sd(x))) barchart(weight[,'mean'] ~ Diet,