Multivariable Linear Regression in R: Everything You Need to Know!

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 100

  • @sha0843
    @sha0843 7 месяцев назад +5

    I am a PhD candidate and I am using these models in my data analysis. Great video so far on this topic!

  • @chacmool2581
    @chacmool2581 7 месяцев назад +2

    1:12 It gets worse. In the context of ANOVA you have 'factors' for categorical independent variables and 'covariate' for numerical ones. 😢
    1:50 yeah, performance::check_model() is the bomb.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +4

      yeah, factor is another useless name. drives me nuts. especially, when ML folks come and name old good known things in a new fancy manner :), just complicating things for everyone while feeling great. check_model rocks 🤘

  • @demigod4504
    @demigod4504 3 месяца назад +1

    This is gold. Thank so much Sir for sharing this valuable knowledge ❤

  • @Featherlicht
    @Featherlicht 6 месяцев назад +1

    Hands down some of the most informative videos that exist on Linear models. Very concise too ! Thank you 🙏

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  6 месяцев назад +1

      You're very welcome! And thanks for such a generous feedback! ☺️

  • @tom_hoel
    @tom_hoel 7 месяцев назад +2

    Incredible work! Thanks :) Could you please deepdive into tidymodels too?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +2

      Great suggestion! :) And I actually tried to do that for linear model twice, but broke up due to a unnecessary complexity of tidymodels for simple models, like LM of GLM. Paradoxically, the functions I use here are much more insightful :). But I still have it in the back of my mind to dive deeper into tidymodels. I just created one video on resampling in tidymodels, and it did not perform better as good as one might think in the age of machine learning. The emmeans video is better, may be because it's more useful and pragmatic. Anyway, thanks for watching and for your nice feedback!

    • @OnLyhereAlone
      @OnLyhereAlone 7 месяцев назад

      I'm not surprised by your observation. Why would anyone do machine learning using the complicated recipes in TidyModels when SciKitLearn in Python is much tidier and straightforward?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  6 месяцев назад

      well, one day I have to learn Python too I am afraid ;)

  • @ahmedelkoumi4306
    @ahmedelkoumi4306 7 месяцев назад

    Great and to the point. Thanks!
    I'd like to see you explain some topics like propensity score matching, multiple imputation, and principal component analysis.
    I guess that would be fantastic if you present them in a such elegant way.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      Thanks, Ahmed! I already have an older video on Imputation, but it still works, I use {missRanger} package for imputation to this day. Feel free to check it out! Thanks for the suggestions, I'll put the on the list! I plan to cover basic most common models first though, like logistic regression, before coming to PCA. So, please, stay tuned. Cheers!

  • @Positive_musician
    @Positive_musician 7 месяцев назад

    Outstanding! Thank you so much for putting so much effort in these educational videos!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад

      So nice of you! Greatly appreciate your positive feedback!

  • @faisalaziz6963
    @faisalaziz6963 7 месяцев назад

    Fantastic and concise content as usual with elegent explanation! Keep up your great work!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад

      Much appreciated! I always enjoyed creating content, but such warn feedback as yours tells me that it's also useful! Thanks so much!

  • @soylentpink7845
    @soylentpink7845 7 месяцев назад

    Very good explanations! Very good visualizations! Great - thank you!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад

      Glad you enjoyed it! Thanks for positive feedback! 🙏

  • @hikeaway1596
    @hikeaway1596 3 месяца назад

    as always - excellent!

  • @amosarubi8468
    @amosarubi8468 4 месяца назад

    Thanks so much!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  4 месяца назад

      You're very welcome! Thanks for watching and commenting! That's the best support for the channel!

  • @suelook9562
    @suelook9562 6 месяцев назад

    Excellent work! Thanks YuzaR

  • @yassinejaber5924
    @yassinejaber5924 4 месяца назад

    Excellent explanations!

  • @NiiKotey_Major
    @NiiKotey_Major 7 месяцев назад

    Hi Prof/Dr. Yury, I really love your videos because they are very intuitive. Please share how to analyse Likert scale questions using R. Thank you.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      Great suggestion! It's actually already on my to-do list! Time is the limiting resource, because I have a normal job to pay the bills. But I'll do my best to produce more content. Thanks you very much for feedback and for watching!

  • @rubyamanda9009
    @rubyamanda9009 4 месяца назад

    Hi, I’m a new subscriber. Wow🎉I am glad you shared this! Thank you!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  4 месяца назад

      Thanks 🙏 Amanda! Hope other videos are also useful ☺️

  • @hendrikpehlke4973
    @hendrikpehlke4973 5 месяцев назад

    Wow! One of the best videos I have ever seen. Vwer informative.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 месяцев назад

      Wow, thanks for such a generous feedback! If you know some folks who also would benefit from it, feel free to share it! I wish I had something like this video as I started to learn R. I hope the other videos are helpful too! Thanks again! Cheers!

  • @kellycriterion1019
    @kellycriterion1019 5 месяцев назад

    Great work. Please do videos on Survival Analysis in R as well😊

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 месяцев назад

      Thank you very much! Will definitely do. Just made some videos on linear regression in R. Logistic will follow and then the rest of models including Survival and ML one day. 3 years ago I've done two videos on survival already, but they are old, theoretical and low quality. I'll redo them in a more concise and R focused way. Thanks for nice feedback and for watching!

  • @leno9636
    @leno9636 7 месяцев назад

    Hi, thanks again for this great video.
    I really enjoy your explanations, but your blog was much more useful for quick access to concentrated information.
    Videos are very helpful to understand from scratch, but seeing important screenshots in your blog quickly during a time-sensitive project is very important.
    Plus, Koji is also down.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      Thanks a lot for your nice feedback! Unfortunately, my blog was shut down, since Netlify wanted me to start paying for increasing traffic. Since R is open source and I do not earn anything from my blog, I refuse to pay for trying to do something useful for the world. I know the blog is useful, thus I am working on a solution to find the alternative for Netlify. But since I am not the IT guy, it might take time. If you have any suggestions what service is really free for static websites, don't hesitate to inform me.
      As for the Koji, this nice startup was sold, thus, I took the link down from the last video. But if you would like to support me somehow, the best free support is likes, comments and watch-time. While when you would support me financially, you can Thank the video (although youtube takes ca. 50% of that), send me something via paypal or, become a member of the channel. I still did not set up the membership, because I don't believe anyone your become a member even for 1$ per month. But may be I am wrong? Anyway, thanks for watching and being part of my journey on this channel mate!

  • @Y45HV1N
    @Y45HV1N 7 месяцев назад

    This is super cool! Best rstats content on RUclips! Will you show multivariate (multiple outcomes) next?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      Wow, thanks for such a generous feedback! 🙏 Love it! Multivariate? Eventually, but I never understood what's the difference between multivariate models with 3 different outcomes and 3 separate models of the same outcomes? Is there any connection between outcomes, are they somehow weighted or so? Because if not, I already created a video which is much better than that "Many Models At Once". If yes, please, let me know, and, if you can, recommend some good literature. Cheers!

    • @Y45HV1N
      @Y45HV1N 7 месяцев назад

      @yuzaR-Data-Science my understanding is that if the outcomes are correlated but still different, then, not accounting for this could bias the estimate, and on the other hand, accounting for it could reduce the standard error, providing more precision (and statistical power). For example, if you want to study the effect of a medicine on some sort of mental health phenomenon, you could ask for patients to self-report their state, but in the same study, you could also ask their doctors to give their ratings, and on top of that you could maybe use their smartwatch to collect some behavioral data. All three are indicators of the same thing but also a bit different.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      that's interesting, I work in vet-med area, and we rarely do multivariate models, but I would have a look at them, and in the end, if I'll find them useful, I'll definitely make a video on them. For now I am concerned about the assumptions. what if assumption for one response hold, but the assumptions for the other not? What model do you use then? Quantile regression? Is there something line a non-parametric MANOVA in R anyway? soooo, many questions :)

  • @a-sadeghi-md
    @a-sadeghi-md 7 месяцев назад

    Beautiful

  • @fouedhamouda7356
    @fouedhamouda7356 7 месяцев назад

    thanks for sharing

  • @namelessbecky
    @namelessbecky 5 месяцев назад

    Thank you sir

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 месяцев назад

      So nice of you! Thanks you for watching and commenting!

  • @Faustasyan
    @Faustasyan 7 месяцев назад

    Thanks for the great video!

  • @robertssooka8824
    @robertssooka8824 3 месяца назад

    Interesting, I like it

  • @WilForDataScience
    @WilForDataScience 7 месяцев назад

    Excélsior!

  • @alexandreb1899
    @alexandreb1899 7 месяцев назад

    As usual: excellent class! Best content about stats on yt! But it is not possible to access the scripts via the link in the description (it is broken)

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      Thanks for such a generous feedback, Alex! Much appreciated!
      Sorry, Netlify shut down my blog since they want me to pay for increased traffic. I refuse to pay for doing something useful for the world (without earning absolutely nothing) and since R is open source. But I want to reopen it ASAP, as soon as I find an alternative for Netlify. It'll take some time though, because I am not an IT guy. But since RUclips is still free, please use the videos till blog is up and running again, since my blog is actually the script for the video, word by word, code by code. Thanks for understanding!

  • @ramoda13
    @ramoda13 5 месяцев назад

    Great video

  • @Benjiz1337
    @Benjiz1337 7 месяцев назад

    Hi yuzaR, is your website down? I'm trying to get get the R code from some of your videos, but is unable to visit your site.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад

      Hi Benjiz, unfortunately it was blocked for too much traffic. I’ll try to reopen it ASAP with free alternative, but in the meanwhile please just rewatch the videos, because my blog is the script for them, so you won’t miss anything. If you wanna get the whole code now, consider to join my channel to become a member, because I send the code to members. Cheers

  • @moviezone8130
    @moviezone8130 6 месяцев назад

    You set the bar high sir, I am new to this channel but I found it highly informative and educational. Please can you share the code in pdf or some other means. How can I find you on githu. I am YBMengist from Ethiopia.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  6 месяцев назад +1

      Thank you again for your nice feedback. Have a look at my responses to your two previous questions. Kind regards!

  • @efdalkaya
    @efdalkaya 3 месяца назад

    Thank you for video. I am using performance package in shiny web application. How can i import performance package in shiny?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  3 месяца назад

      I never tried. Could you please let me know, whether it worked, when you try it out? Thanks for nice feedback!

  • @staedtler8479
    @staedtler8479 7 месяцев назад

    i like equatiomatic package (EDIT i found it)
    Thanks again for your efforts !

  • @tighthead03
    @tighthead03 Месяц назад

    Thanks for your content, this is super useful. How can performance be used with tidymodels glm models? Any examples you can point to please?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  Месяц назад +1

      that's a great question. unfortunately not. that's why I am still hesitating making tidymodels videos. they don't work with the most practical stats packages together, yeat. and since I do more stats then ML, I will cover stats topic first before going ML and AI

    • @tighthead03
      @tighthead03 Месяц назад

      @@yuzaR-Data-Science thanks for the feedback keep up the excellent videos 👍

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  Месяц назад +1

      I will 🙏

  • @statlab_stat.solution
    @statlab_stat.solution 7 месяцев назад

    Thanks

  • @faruqueazamwalid219
    @faruqueazamwalid219 6 месяцев назад

    thanks a bunch!! I have a random question: how to add a proportional weightage to a numeric variable on the outcome variable in a lm/glm and visualise. It is much like giving the weightage to the sample size of each study “n” to the outcome. Much like meta analysis but it is a pooled analysis. Thanks in advance

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  6 месяцев назад +1

      hmm, before I say something wrong or stupid, I'd rather say I don't know.
      There is a "weights" argument in the "lm/glm" (lm(data = mtcars, am ~ mpg, weights = )), but I never used it to be honest.

    • @faruqueazamwalid219
      @faruqueazamwalid219 6 месяцев назад

      @@yuzaR-Data-Science thanks!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  6 месяцев назад

      you are always welcome!

  • @NextGenAge
    @NextGenAge 6 месяцев назад

    Which version of RStudio are you using? I'm running into error's often.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  6 месяцев назад

      The last one. But R Stuio is most likely not a problem. Just update everything: R, Rstudio and packages 📦 let me know whether it worked

    • @NextGenAge
      @NextGenAge 6 месяцев назад

      @@yuzaR-Data-Science It's mostly when I do Multiple LR with many features. I already made sure all were numeric and no categorical but it doesn't plot for check_model(). For some other lr it still works..?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  6 месяцев назад

      still, the rstudio is not a problem, it could be too many predictors, bad data quality, total separation or something else. get it to work with a few predictors first, then you can select good predictors and go with them. check_model works fine a my pc with most models.

  • @JRFtoPhD
    @JRFtoPhD 7 месяцев назад

    Is there any way .. from where i can get the data used by you in this video

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад

      of coarse!
      install and load ISLR package, the data is in there ;)
      library(ISLR)

  • @45tanviirahmed82
    @45tanviirahmed82 7 месяцев назад

    I'm so into your channel for your clear concise explanation. Watching and learning from each of your videos one by one. Thank you very much.
    [One problem I have been facing when using check_model() command, It shows Plot area is too small. I've tried the solutions it shows in console panel, but couldn't make it work, didn't find any solution online]

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад

      Thank you so much for such a nice feedback! I greatly appreciate that!
      Sure, it's normal. There are several solutions for it. First, just increase your plot area via dragging the plot window higher and wider. Then, you can click on the + in the plot area to open an extra window, like I do in my videos. And lastly you can use ggsave command to save the last plot like I do in videos. Let me know whether one of those worked.

  • @OnLyhereAlone
    @OnLyhereAlone 7 месяцев назад

    First here. Good job as usual.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад

      :) Thanks mate! Greatly appreciate your support!

    • @OnLyhereAlone
      @OnLyhereAlone 7 месяцев назад

      Now that I'm not rushing to be the first commenter, I have to ask:
      Why use ggeffects instead of emmeans? And although you pointed out that the result is not averaged over all levels of all factors, you should have mentioned that emmeans (or maybe other libraries) should be used in that case. What I use is sjplot tab model to just tell which factor have significant effects, and then emmeans with contrast/pairwise which I like to plot out.
      By the way, what do you think about showing both in a publication?
      Another question is that does it not matter that your multivariate model has only + and not * between all the predictors.
      Sorry, I know these may not all be short answer stuff, but I'll appreciate your response as always. Thanks.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  6 месяцев назад

      Hi mate, first, the ggeffects instead of emmeans it's just convenience for visualization. In fact, ggeffects uses emmeans in the background. Tab_model is fine, but does not produce contrasts, emmeans and tbl_regression(add_pairwise_contrasts = T) do. I always show contrasts in my publications! Don't know what do you mean by "both". You can't use interactions between all the predictors, your model would most likely collapse and be hardly interpretable. Interactions are cool, and I use them, but they can be pain in the ass, so I try to use only bivariable interactions (between only two predictors), not multiple interactions in the same model. Cheers!

  • @lkobzik
    @lkobzik 2 месяца назад

    Please renew the link to the code for this video, I just missed the window, joining today but it is 8 days after your link which lasted 7 days...Also in addition to my concrete positive feedback by joining, please accept enthusiastic compliments on the style and content of your videos!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  2 месяца назад

      Hey hey 👋 thanks for joining the community and for such a nice feedback on my style! That's always very helpful, since people have different tastes, and when I do content which resonates with others - that's very fulfilling! I just updated the link for multivariable regression. Thus enjoy the article and let me know when you need other pdfs with code too. Very warm welcome and thank you for being here! 🙏

    • @lkobzik
      @lkobzik 2 месяца назад

      I saw a message saying you renewed the link, thank you, but the renewed link (now 3 days old) still gives an expired message from wetransfer...sorry to be a bother....also your reply here has disappeared so I hope I am not hallucinating 🙂but there are 2 messages for the same video in the group perks page so I think I am sane

    • @lkobzik
      @lkobzik 2 месяца назад

      I refreshed the page and your reply is back, so that is progress, please see prior message@@yuzaR-Data-Science

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  2 месяца назад

      hey hey, wetransfer reduced the number of days to 3 (here is what they say: Transfer expires in 3 days). then I have to udjust all the messages. I'll try to handle that issue asap. until then I renewed the link on the community tab. but here it is also for your convenience: we.tl/t-lSFy6cX2Ct

  • @Lenman55
    @Lenman55 7 месяцев назад

    what happened to your website?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +4

      Netlify shut down my blog since they want me to pay for increased traffic. I refuse to pay for doing something useful for the world (without earning absolutely nothing) and since R is open source. But I want to reopen it ASAP, as soon as I find an alternative for Netlify. It'll take some time though, because I am not an IT guy. but since RUclips is still free, please use the videos till blog is up and running again, since my blog is actually the script for the video, word by word, code by code. thanks for understanding!

    • @Lenman55
      @Lenman55 7 месяцев назад

      @@yuzaR-Data-Science I see, too bad I really enjoyed your work! Maybe github pages is an alternative?