Search code examples
rggplot2errorbar

Errorbar in ggplot is using SD or SE as default


I use stat_boxplot(geom="errorbar", width=.3) to add an errorbar to my plot. But I do not know the errorbar means standard deviation (SD) or standard error (SE). I wanna make sure my description is right. Do any guys know this and please give a help.

Thanks a lot.


Solution

  • Check out the instructions:

    First, it is necessary to summarize the data. This can be done in a number of ways, as described on this page. In this case, we’ll use the summarySE() function defined on that page, and also at the bottom of this page. (The code for the summarySE function must be entered before it is called here).