R demo | How to visualize models Part 1 | multiple linear models, all assumptions & post-hocs

  Рет қаралды 4,768

yuzaR Data Science

yuzaR Data Science

Күн бұрын

Пікірлер: 32
@angusyoung6932
@angusyoung6932 8 ай бұрын
One of the most detailed and enjoyable statistics videos I have ever seen. So many useful tips here and your passion really shines through. Thanks a lot for this!
@yuzaR-Data-Science
@yuzaR-Data-Science 8 ай бұрын
Wow, thank you! Glad you liked it! It this old one was helpful, you might enjoy the more recent videos, especially on emmeans package and all kind of modelling, like bootstrap, quantile or glmulti. Thanks for watching! cheers.
@angusyoung6932
@angusyoung6932 8 ай бұрын
@@yuzaR-Data-Science Thank you, working with emmeans at the moment so definitely going to have a look. Have a great day!
@yuzaR-Data-Science
@yuzaR-Data-Science 8 ай бұрын
@@angusyoung6932 thanks! you too! :)
@warrenmalambo578
@warrenmalambo578 2 жыл бұрын
This is an amazing tutorial! I love this video; scratch that I love all of your videos. Looking forwarding to more videos. Amazing
@yuzaR-Data-Science
@yuzaR-Data-Science 2 жыл бұрын
Thank you so much for such a nice feedback! And for watching! That encourages to do more!
@eddieNyakan
@eddieNyakan 4 жыл бұрын
Thank you for this great tutorial video that I am going to use to train my students. Again, thank you and I can't wait for more videos from you.
@yuzaR-Data-Science
@yuzaR-Data-Science 4 жыл бұрын
Dear Eddy, thanks for such a great feedback! It means a lot for me, because I also teach students and colleagues. 😁 In the medical field, where I work, we mostly do classic statistical tests and if this would be of use to you and your students, please, have a look at 3 videos on Box Plots with statistical details I did just recently. My students liked those videos more, since modelling was too fancy and complex for them. Kind regards!
@rafaelkenjinishihora9266
@rafaelkenjinishihora9266 4 жыл бұрын
Dear Dr. Yury Zablotski, thank you very much for this very nice and instructive video. I am looking forward to watching the next one. Congrats! \o/
@yuzaR-Data-Science
@yuzaR-Data-Science 4 жыл бұрын
Thanks a lot, Rafael! I am sooo glad it is useful!!! The second part of it will be online very soon, I already have the code (about the models I promised in the beginning). Just need to record the video. Stay healthy! Cheers!
@amanvashisht4429
@amanvashisht4429 4 жыл бұрын
This was just awesome, thank you! Eagerly looking forward to the next video:)
@yuzaR-Data-Science
@yuzaR-Data-Science 4 жыл бұрын
Thanks a ton for such a nice feedback, Aman! 😊 I am already working on the second part of it. Will be online latest next week.
@yusmanisleidissotolongo4433
@yusmanisleidissotolongo4433 Жыл бұрын
Fantastic!!!!!
@yuzaR-Data-Science
@yuzaR-Data-Science Жыл бұрын
So nice of you! Thanks!
@udayan62
@udayan62 4 жыл бұрын
Thank you very much for this video. I think I learned a lot from it. Please also make the R script available, perhaps on Github. That will help us try your techniques with our own data. Thanks again.
@yuzaR-Data-Science
@yuzaR-Data-Science 4 жыл бұрын
Thanks a lot for your feedback Udayan! That helps a lot! :) Yes, I have thought about the code, but my Webside, where I usually keep the code isn't running at the moment. Technical reasons, I am not able to solve. So, I plan to get a github profile and produce a new website (blog) where I'll put all the code in the near future. Unfortunately the day job at the university takes the most of my time, so it might take a wile. But when it is done, I'll add the link to the description of the video. So, please, stay tuned. Kind regards! Yury
@AbdulahadSapai
@AbdulahadSapai 3 жыл бұрын
Thanks, just mind bowling crazy stuff. It really force me to switch from Stata to R
@yuzaR-Data-Science
@yuzaR-Data-Science 3 жыл бұрын
Thanks for a nice feedback, Abdulahad! I don't know much about Stata, but I certainly love R! :)
@AmeekBhalla
@AmeekBhalla 3 жыл бұрын
Why do `lm()` and `allEffects()` produce different estimates of the mean of the first level of the factor `jobclass` in the additive model with two categorical predictors (the third model in the video)? This anomaly disappears in the interactive model with the same two predictors (the sixth model). Thank you for doing this. Your videos are always relevant, clear, and well produced.
@yuzaR-Data-Science
@yuzaR-Data-Science 3 жыл бұрын
Dear Ameek, thanks for your question and sorry for the late reply, I needed to work a lot. I checked it and in my case the estimates of "1. Industrial" are both identical to the second decimal (rounded, I guess) place, namely, 103.170 in "summary(m)" and 103.1695 in "allEffects(m)". The CIs might sometimes vary though. Kind regards!
@AmeekBhalla
@AmeekBhalla 3 жыл бұрын
@@yuzaR-Data-Science Hi Yury, Thank you for the reply. Don't worry about the timing though, you do a lot here already, especially given your day job. I got the estimate you got (103.170) from both `lm()` and `allEffects()` when only one predictor was put into the model (your first model). However, with two predictors [as in your third model, lm(salary ~ jobclass + education, d)], I got different estimates. From `lm()` I got "(Intercept)" equalling 83.9, while from `allEffects()` I got "1. Industrial" equalling 109.08.
@AmeekBhalla
@AmeekBhalla 3 жыл бұрын
# proof that the estimate of the first level of the first factor differs between `lm()` and `allEffects()` # extracting the estimate produced by `allEffects()` factor1_level1_allEffects % allEffects() %>% pluck("jobclass") %>% as_tibble() %>% filter(jobclass == '1. Industrial') %>% select(fit) # extracting the estimate produced by plain `lm()` factor1_level1_lm % tidy() %>% filter(term == '(Intercept)') %>% select(estimate) isTRUE(factor1_level1_allEffects != factor1_level1_lm)
@yuzaR-Data-Science
@yuzaR-Data-Science 3 жыл бұрын
Hey Ameek, :) nice code, thanks! Yes, now I see where the problem is. In the first model you filter our the jobclass == '1. Industrial', right? But in the second the `(Intercept)` contains both "first" levels of both predictors at the same time, namely, '1. Industrial' from the "jobclass" and `1. < HS Grad` from the "education". The intercept in this model is the reference level for both predictors and for all their categories at the same time.
@yuzaR-Data-Science
@yuzaR-Data-Science 3 жыл бұрын
However, in the model with interactions "jobclass * education", the intercept take the first level of the fists predictor, which happens to be "jobclass". So, the intercept here is the `1. Industrial` of the `1. < HS Grad`, and then everything fits :)
@fishfish20
@fishfish20 2 жыл бұрын
Do we have an equivalent package to "sjplot" in the higher versions of r? Thank you
@yuzaR-Data-Science
@yuzaR-Data-Science 2 жыл бұрын
What do you mean by the higher version of R? Older?
@fishfish20
@fishfish20 2 жыл бұрын
@@yuzaR-Data-Science My bad, I tried installing the sjPlot package and got an error message. I saw your reply and concluded that I'm the one who made a typo. Everything is ok. Thank you so much. Regards
@yuzaR-Data-Science
@yuzaR-Data-Science 2 жыл бұрын
@@fishfish20 no worries :) typos make 90% of my code-mistakes 😁
Всё пошло не по плану 😮
00:36
Miracle
Рет қаралды 6 МЛН
HELP!!!
00:46
Natan por Aí
Рет қаралды 34 МЛН
MY HEIGHT vs MrBEAST CREW 🙈📏
00:22
Celine Dept
Рет қаралды 103 МЛН
Wait for the last one 🤣🤣 #shorts #minecraft
00:28
Cosmo Guy
Рет қаралды 22 МЛН
R package reviews | glmulti | Find The Best Model !
13:27
yuzaR Data Science
Рет қаралды 13 М.
(Simplified) Linear Mixed Model in R with lme()
26:17
LiquidBrain Bioinformatics
Рет қаралды 72 М.
7 Reasons to Master Scatter Plots in {ggplot2} with World Happiness Data
14:36
Multivariable Linear Regression in R: Everything You Need to Know!
20:48
yuzaR Data Science
Рет қаралды 6 М.
Всё пошло не по плану 😮
00:36
Miracle
Рет қаралды 6 МЛН