[R] Question about creating error bars
dmb at mrc-dunn.cam.ac.uk
Tue Dec 28 02:26:28 CET 2004
On Thu, 23 Dec 2004, Dan Bolser wrote:
>I have data that looks (very roughly) like this...
>Several 'groups', each group with a very variable number of
>data points associated.
>v.1 <- c(rep(50,1), rep(5,5), rep(2,10)) # Set up
>v.2 <- c('a','b','c','d','e','f','g','h', # the
> 'i','j','k','l','m','n','o','p') # groups
>v.3 <- rep(v.2,v.1) # here.
>v.4 <- rnorm(length(v.3)) # Simulate data.
>v.5 <- tapply(v.4,v.3,mean) # My analysis.
>As the number of data points in a group gets smaller, so the variance of
>the mean value for that group goes up. I would like to bootstrap some
>error bars to show roughly how variable the value for each group is. Here
>we have a normal distribution, but mostly my data is binary (i.e. each
>group has a different number of (nearly) binary observations). The groups
>are ordered, and I want to see any trend in my data accross the groups.
Nothing I can do to help pal, sorry.
>R-help at stat.math.ethz.ch mailing list
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help