Master Simple Linear Regression with Numeric Predictor in R

Поділитися
Вставка
  • Опубліковано 6 сер 2024
  • Simple linear regression demonstrates how one numeric predictor affects a numeric outcome. For example, it can reveal whether age actually translates to higher paychecks. So, let’s learn (1) how to build a linear regression in R, (2) how to check ALL model assumptions with a ONE simple and intuitive command, (3) how to visualize and interpret the results, and much more.
    If you only want the code (or want to support me), consider join the channel (join button below any of the videos), because I provide the code upon members requests.
    Enjoy! 🥳
    Welcome to my VLOG! My name is Yury Zablotski & I love to use R for Data Science = "yuzaR Data Science" ;)
    This channel is dedicated to data analytics, data science, statistics, machine learning and computational science! Join me as I dive into the world of data analysis, programming & coding. Whether you're interested in business analytics, data mining, data visualization, or pursuing an online degree in data analytics, I've got you covered. If you are curious about Google Data Studio, data centers & certified data analyst & data scientist programs, you'll find the necessary knowledge right here. You'll greatly increase your odds to get online master's in data science & data analytics degrees. Boost your knowledge & skills in data science and analytics with my engaging content. Subscribe to stay up-to-date with the latest & most useful data science programming tools. Let's embark on this data-driven journey together!

КОМЕНТАРІ • 46

  • @aminebahmed7526
    @aminebahmed7526 5 місяців тому +3

    Excellent explanation, waiting for multiple linear regression video. I would add that it is sometimes useful to make the intercept interpretable by fitting a model with a centered independent variable (by subtracting each value of the var from its mean), which would give a practical interpretation of the intercept when x = 0, in which case the intercept would correspond to the increase in y when x = mean (independent variable).

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому +4

      Great suggestion! I also thought of it, but decided not to overload video with more ideas. This topic would be a great separate video though. Thanks for watching!

  • @Les_decouvertes
    @Les_decouvertes 5 місяців тому +1

    Dear Yuza,
    Always a pleasure to look at your new publications, very informative.
    I often use the report package to have a global and clear overview of my dataset and/or model.
    Looking forward to seeing what happens next, perhaps with classification models (SVM, KNN, LR, etc.),
    THANKS !

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому +1

      Thanks for such a nice feedback! Sure, I'll come to machine learning models, like SVM and KNN etc., but I would first cover the basics as much as I can, linear, logistic, mixed-effects, may be bayesian first. I hope you can stick as long as it takes. thank you for your continuous support!

  • @muhammedhadedy4570
    @muhammedhadedy4570 5 місяців тому

    Excellent presentation, as usual. I would be so grateful if you could make tutorials on logistic and Cox regression models.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому +1

      Thanks! The logistic regression is definitely the next on 😉 but I have to cover liner regression first with a few more videos. Coc regression is also on the list. Thanks for watching!

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 5 місяців тому

    Your knowledge of interesting packages is impressive.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      Glad you like them! for most of them, I have an extra video because I use them everyday in my job and find them very useful

  • @fourlokody
    @fourlokody 5 місяців тому

    great video, I like seeing the process from start to finish. would enjoy seeing more datasets analyzed how you like to do it.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      Thanks! Great idea! Will do! But I plan to cover some basic modeling first, then start to analyzing datasets from start to finish. If you know some good resource for publicly available data, please share it with me.

  • @yurisilvadesouza3059
    @yurisilvadesouza3059 5 місяців тому

    Amazing video and explanation! I’m always looking for better ways to interpret and explain LMs so that I can teach others better, and you definitely nailed it!!! Thank you very much. My mental model predicted you explained well the remaining variation in my brain regarding LMs (P

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      good sense of humor! 😂 but you forgot to say "no pressure" 😂 Thanks for such a nice feedback! I'll try my best. By the way, you have a nice name, Yuri ;) My name is almost as beautiful - Yury. Thanks for watching!

  • @caduguimaraes
    @caduguimaraes 5 місяців тому

    Once again, amazing vídeo

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      Thank you so much 😀 Glad you enjoyed it. thank you for your continuous support!

  • @ibrahimlawan9663
    @ibrahimlawan9663 5 місяців тому

    Very useful. This is an excellent explanation. Looking forward to more regression videos.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому +1

      Glad it was helpful! More to come! Thanks you for watching!

  • @richardmose9266
    @richardmose9266 5 місяців тому

    Very useful, thanks

  • @emredunder9108
    @emredunder9108 5 місяців тому

    Perfect video!

  • @Walker-nb9de
    @Walker-nb9de 5 місяців тому

    You are the best😍😍😍😍

  • @ahmadratibsharafat6737
    @ahmadratibsharafat6737 5 місяців тому

    Very amazing videos could you please make videos on parametric tests too

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      Thanks! I actually did a while ago. Just look for t-test, anova on just scroll through my channel and you'll find them. Thanks for watching!

  • @colindoherty372
    @colindoherty372 5 місяців тому

    Sensational teacher, super clear and very useful. I often wonder with your videos, what are your steps when the performance of the model violates certain assumptions. Is there a basic and agreeded upon stepwise process to handle violations?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      thanks for a nice feedback, Colin! depends on assumptions. you check the assumptions one by one and try to relax them. for instance, when there are outliers, remove, when data is very scewed, log them. When nothing helps (or if you don't want to solve those problems), use some non-parametric alternative: robust model, median model (quantile regression), bootstrapped regression. I already covered them all on my channel, so, check them out. Cheers and thanks for watching!

  • @amareddoud6781
    @amareddoud6781 5 місяців тому

    super your way of explaining, hyper well summarized, your pedagogical method is an example to follow. I wanted to know how to access your blog, which is currently inaccessible. Thank you for replying.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      Glad it was helpful! My blog was unfortunately banned, because I did not want to pay for increasing traffic. I don't wanna pay, because I don't earn from my blog and I write about open source software, so, it's counterintuitive for me to pay for doing something good for others. The youtube is still free though, so, I might be providing scripts on my blog offline for members, but I'am not sure people would pay even a minimum amount like 1$ or so per month or so. If at least one person, like you, would, I would organize membership on youtube. However, why would pay even 1$ if youtube is free and you just can rewatch the video, right?

  • @juliusirungu1363
    @juliusirungu1363 5 місяців тому

    Great video as always.
    How to use emmeans to predict multiple linear regression with category variables is my question on the next video

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому +1

      Great suggestion! First, I plan only one categorical predictor video. Then the next video would be multiple linear regression interpretation, where I'll use one numeric and one categorical. Thanks for continuous support!

  • @Marieblue70
    @Marieblue70 Місяць тому

    And where can I find your video explaining the 'performance' package to visually check the model assumptions? Thank you very very much!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  29 днів тому

      Oh, it's actually on the channel. the thumbnail says: "check how good your model is" ;) hope you enjoy that one.

  • @abdur-rahmanridwan9045
    @abdur-rahmanridwan9045 4 місяці тому

    Awesome video. It will be great to see a similar video on logistic regression. Is this something you are considering anytime soon?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  4 місяці тому +1

      Absolutely! In fact it's the next series of videos I plan. I just need to finish up with a few more videos on classic linear regression before. Thanks for watching and commenting, that's the best support!

    • @abdur-rahmanridwan9045
      @abdur-rahmanridwan9045 4 місяці тому

      @@yuzaR-Data-Science Great to hear. Looking forward to the next videos.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  4 місяці тому

      cheers!

  • @pentagoseed8739
    @pentagoseed8739 5 місяців тому

    Excellent tutorial and how you explain the concept, overall nice video. but why it seems i cant visit your website? it says that the site is not found. thank you

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      thanks! just a few days ago my site was closed, since they wanna me to pay for a traffic. But since I do not earn anything from my website and R is open source, I don't wanna and actually can't pay as much as they want. I am working on a solution for it.

  • @itsahmedian
    @itsahmedian 5 місяців тому

    please make a video on PCA

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      Great suggestion. I'll put it on the list! Thanks for watching!

  • @Marieblue70
    @Marieblue70 Місяць тому

    I am calculating a linear model for a questionnaire where the variables have 5 levels (Likert scale from 1 = very good to 5 = very bad). I am unsure whether to treat these variables as factors or as numeric. Since I treat the Likert scale as an interval scale, I have been treating these variables as numeric, but I am not sure if this is correct. Is there a standard rule for this?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  29 днів тому

      that's an interesting question. I usually hate likert scale, exactly because of that uncertainty. The recomendation is to use ordinal regression or ordinal logistic regression, but I struggle with interpretation and they usually produce shitty results. So, I use either kruskal-wallis / mann-whitney for univariable, or just linear regression for multivariable questions. I think the bootstrapped linear regression would also deliver if you have a lot of data.

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 5 місяців тому

    Strictly speaking the line should only fit with the range of x values.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      If this would be the case, the intercept could not be calculated, right ? 😉

    • @haraldurkarlsson1147
      @haraldurkarlsson1147 5 місяців тому

      No, it just means that the predictions don't go beyond below the x min.@@yuzaR-Data-Science

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 місяців тому

      yes, when we just plot the predictions of, let's say, age, the model does not extrapolate and only includes the range of the data we have. it only does so, when we explicitly ask for it, like age[0, 50, 100]