R - Graphs - Bar Charts with Error Bars in Ggplot2

  Рет қаралды 25,564

Statistics of DOOM

Statistics of DOOM

Күн бұрын

Пікірлер: 43
@GigiNYC11
@GigiNYC11 5 жыл бұрын
I usually don't comment on KZbin, but this video was a life saver. I don't understand why other people make tutorials so complicated, they should take a lesson from you.
@StatisticsofDOOM
@StatisticsofDOOM 5 жыл бұрын
Thank you for the kind words!
@theleggylady
@theleggylady 8 жыл бұрын
Best R tutorial I've watched so far! Very clear and helpful. Thanks!
@aaronbenson6332
@aaronbenson6332 7 жыл бұрын
I've watched about 10 of your videos so far and they have been extremely helpful. Thanks so much!
@StatisticsofDOOM
@StatisticsofDOOM 7 жыл бұрын
Glad to be of help!
@retrowatermelon
@retrowatermelon 6 жыл бұрын
this video SAVED me, thanks so much! you're the best!
@leandromagalhaes7649
@leandromagalhaes7649 9 жыл бұрын
Thank you so much for sharing, Erin. Very clear and practical guide!
@DrAmiry
@DrAmiry 6 жыл бұрын
Thank you so much for this nice and helpful work. It helped me a lot!
@georgeheimpel1365
@georgeheimpel1365 5 жыл бұрын
Great tutorial - I really appreciate the cleanup hack too!
@StatisticsofDOOM
@StatisticsofDOOM 5 жыл бұрын
Yes! also you can try JUST + theme_bw() for your graph - it's very similar to what I wrote (I discovered this later).
@hanhnguyen84
@hanhnguyen84 5 жыл бұрын
Thank you so much! You are the best!
@hernanlarapadilla1878
@hernanlarapadilla1878 8 жыл бұрын
Perfect explanation!!!!!
@StatisticsofDOOM
@StatisticsofDOOM 8 жыл бұрын
Thanks!
@yvonnemadegwa967
@yvonnemadegwa967 5 жыл бұрын
thank you
@satyajeetgupta9052
@satyajeetgupta9052 7 жыл бұрын
Thanks, it helped a lot.
@StatisticsofDOOM
@StatisticsofDOOM 7 жыл бұрын
Glad it's helping! :)
@weizhang2076
@weizhang2076 9 жыл бұрын
really clear, I like it.
@merindalee
@merindalee 5 жыл бұрын
Thank you! How would I have the error bars set to standard error?
@StatisticsofDOOM
@StatisticsofDOOM 5 жыл бұрын
Check out this guide - www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/ - little different than what I teach here, but will get you to SE instead of CI.
@samkonstan5254
@samkonstan5254 6 жыл бұрын
Thanks so much for making this video, it really helped me out. One question: how do you use ggplot2 to enter a pre-calculated error bar? Thanks!
@StatisticsofDOOM
@StatisticsofDOOM 6 жыл бұрын
Instead of stat_summary for the error bar, try using (where lower and upper are the numbers for the error bars, you might have to put them in a vector). geom_errorbar(aes(ymin=LOWER, ymax=UPPER, width=.2, position=position_dodge(.9))
@titanlxx
@titanlxx 6 жыл бұрын
Hi, Thank you so much for your video! it's been very helpful, I was wondering if you know any function that may help me to preserve the subgroups with zero counts in a grouped barplot?
@StatisticsofDOOM
@StatisticsofDOOM 6 жыл бұрын
I think that if you leave them in as empty levels, it should work. Not 100% sure though.
@SrJaramango
@SrJaramango 6 жыл бұрын
Awesome video! You helped me a lot! Only one question: how could I find the values of the errorbars? I tried with the "mean_cI_normal" command, but I wasn't able to find them :/. Thank u in advance!
@StatisticsofDOOM
@StatisticsofDOOM 6 жыл бұрын
You are asking how you might find the confidence interval that ggplot is plotting? You can use that function - > data(mtcars) > mean_cl_normal(mtcars$mpg) y ymin ymax 1 20.09062 17.91768 22.26357 you fill in a column (might be filtered by group) to get them directly.
@SrJaramango
@SrJaramango 6 жыл бұрын
Well, I refered to the interval itself, I mean, the substraction of the ymax minus the mean, but I created a function to do it. However, thank u! :D
@jasonmiller7789
@jasonmiller7789 8 жыл бұрын
Anyone know how to make the interaction bar graph if one of the variables is within subjects?
@StatisticsofDOOM
@StatisticsofDOOM 8 жыл бұрын
Yes - you can watch one of our mixed or repeated measures ANOVA videos that covers how to make a bar graph with repeated measures specifically. You would need to melt the data first (using the reshape function) - similar to what happens in the line graph section. Then you can treat it like the double bar graph code.
@coksicak1
@coksicak1 8 жыл бұрын
where can I download the ChickFlick dataset?
@StatisticsofDOOM
@StatisticsofDOOM 8 жыл бұрын
It's from the Andy Field book - but I believe it's here: statstools.com/learn/graduate-statistics-in-r/ under graphs as well.
@alexisankrah3774
@alexisankrah3774 7 жыл бұрын
wow this is really good and im able to set up my multiple bars.... but whenever i try to add my error bars... r studio gives me this message "Warning message: Computation failed in `stat_summary()`: Hmisc package required for this function " ... HELP PLEASE Lol
@alexisankrah3774
@alexisankrah3774 7 жыл бұрын
OH WAIT ! I'm new to R... I just found out that I had to download the package ! THANKS ALOT ! This video is so great for R beginners !
@StatisticsofDOOM
@StatisticsofDOOM 7 жыл бұрын
Glad it's helping! GGplot2 has changed a bit since I made this video and there's a newer one you can watch. kzbin.info/www/bejne/qp7CqZ2Pdpxol5o
@lewishun293
@lewishun293 7 жыл бұрын
Hi, Dr. B Thank you so much for this awesome video!! Is there a quicker way to download the ChickFlick.csv file from your website. I opened it and tried to copy it into excel, but all the data were just in one column. Thanks
@StatisticsofDOOM
@StatisticsofDOOM 7 жыл бұрын
That's probably a mac to windows thing ... you can use text to columns in excel (under the data tab) to fix that problem. We just updated the website, so maybe try downloading again?
@rayray0313
@rayray0313 6 жыл бұрын
Hi. I am making a plot with ggplot2, and I am noticing that the y axis column does not represent my actual data. For example, when looking at gaze duration (i.e., eye tracking research), it should read 500ms for one level in a variable, but it reads 250,000. Any thoughts?
@StatisticsofDOOM
@StatisticsofDOOM 6 жыл бұрын
I had a similar problem recently when trying to overlay several groups data. I would suggest making the plot one piece at a time (like add each layer one run at a time) to see maybe where something is going wrong.
@dondacurator
@dondacurator 5 жыл бұрын
i dig your tutorial but every time I add the theme or cleanup,, the whole graph dissapear ...and I HATE STATS,,just throwing it out there
@StatisticsofDOOM
@StatisticsofDOOM 4 жыл бұрын
Hmmm - that's odd. Instead just try adding + theme_bw() or theme_classic() to the plot to help clean it up. Check out ggthemr as well: www.shanelynn.ie/themes-and-colours-for-r-ggplots-with-ggthemr/
@xxblabla75xx
@xxblabla75xx 6 жыл бұрын
Zoe Deschanel is that you?
@gmjakirullahnooruddin1734
@gmjakirullahnooruddin1734 8 жыл бұрын
Thank you very much for this nice video. I am doing with multiple variables. I got a warning message and did not get the plot. Can you please explain and give me solution of it. Thank you Warning message: Removed 5 rows containing missing values (geom_errorbar).
@StatisticsofDOOM
@StatisticsofDOOM 8 жыл бұрын
That means that you have missing data, so it removed those data points to calculate the mean (sort of like na.rm = T in the mean calculation). I'm not sure why you didn't the graph ... usually you still will get the graph even when you get that error.
@kaleilw
@kaleilw 4 жыл бұрын
Necessary topic, but wish this was done by Marin Stats. Painful and disorganized.
R - Graphs - Line Graphs with Error Bars in Ggplot2
34:05
Statistics of DOOM
Рет қаралды 17 М.
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54
R - Multilevel Models Lecture (Updated)
56:09
Statistics of DOOM
Рет қаралды 46 М.
Describe and Summarise your data
19:44
R Programming 101
Рет қаралды 58 М.
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 373 М.
Simon Sinek's Advice Will Leave You SPEECHLESS 2.0 (MUST WATCH)
20:43
Alpha Leaders
Рет қаралды 2,3 МЛН
R - R, RStudio, and Commands Lecture
38:55
Statistics of DOOM
Рет қаралды 10 М.
Error Bars using R programming
12:37
R Programming 101
Рет қаралды 12 М.
Manipulating and exploring data with dplyr
26:07
Hefin Rhys
Рет қаралды 18 М.