Description Usage Arguments Details Value Functions Disclaimer
Functions to express the uncertainty of a sample.
1 2 3 |
x |
a numeric vector |
na.rm |
logical flag whether to remove NA values |
confidence |
the desired confidence |
These are helper functions for drawing error bars on plots. They both calculate a measure of uncertainty and return a single number, which is the width of the "uncertainty interval". Add and subtract this unmber to the sample mean to get the position of the error bars.
a single numeric
sem
: standard error of the mean, i.e.
the standard deviation of the sample divided by
the square root of the number of elements
conf
: half of the width of the confidence interval of the mean for a numeric vector
The confidence interval is calculated with a t distribution. I don't understand how the confidence interval is calculated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.