[R] Question about creating error bars

Dan Bolser dmb at mrc-dunn.cam.ac.uk
Tue Jan 4 11:29:44 CET 2005


On Tue, 28 Dec 2004, Dan Bolser wrote:

>
>On Thu, 23 Dec 2004, Dan Bolser wrote:
>
>>
>>I have data that looks (very roughly) like this...
>>
>>Declarative: 
>>Several 'groups', each group with a very variable number of
>>data points associated.
>>
>>
>>Procedural:
>>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.
>>
>>plot(v.5)
>>
>>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.
>>
>>Dan.
>
>Nothing I can do to help pal, sorry.
>

No, me either. Reading the ?boot documentation (in the library(boot)) is
less than useful too. The docs appear to be written for an expert in the
field (and R) rather than someone who would like to pick up the function
and run with it.

Its funny because on contrast to the complexity of the (tecnical)
spefication of the required functions is the conceptual simplicity of what
I want to do ...

Sample from some bins and create an error bar (of some kind) from the
samples.

It seems that without knowing how to do this (or exactly where to
look) their is nothing you can do.

>
>>
>>______________________________________________
>>R-help at stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/r-help
>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>>
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list