Linear Regression in R, Step by Step

Поділитися
Вставка
  • Опубліковано 8 лип 2024
  • This video, which walks you through a simple regression in R, is a companion to the StatQuest on Linear Regression • Linear Regression, Cle...
    If you want to just copy and paste the R code, you can get it from the StatQuest GitHub site: github.com/StatQuest/linear_r...
    If you'd like to support StatQuest, please consider...
    Patreon: / statquest
    ...or...
    UA-cam Membership: / @statquest
    ...buying my book, a study guide, a t-shirt or hoodie, or a song from the StatQuest store...
    statquest.org/statquest-store/
    ...or just donating to StatQuest!
    www.paypal.me/statquest
    Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:
    / joshuastarmer
    #StatQuest

КОМЕНТАРІ • 62

  • @statquest
    @statquest  Рік тому +4

    Support StatQuest by buying my book The StatQuest Illustrated Guide to Machine Learning or a Study Guide or Merch!!! statquest.org/statquest-store/

    • @dibeazicha-dj5hb
      @dibeazicha-dj5hb Місяць тому

      Hello, can you do a series of double hurdle regression (craggs vs tobit) , using r? Much appreciation for your video s sir!

  • @Peter-ns6jg
    @Peter-ns6jg Рік тому +13

    Thanks so much. This is my new favorite channel.

  • @xXFlutschiBFHXx
    @xXFlutschiBFHXx Рік тому +13

    I love StatQuest. Thank u for you'r brilliant way of teaching!

  • @2thuggg
    @2thuggg 8 місяців тому +1

    You, sir, are a god send. Literally helping me understand stats conceptually.

  • @koogee4488
    @koogee4488 Рік тому +1

    Thank you so much. I needed this video badly!!

  • @alexwa9959
    @alexwa9959 7 місяців тому +1

    very good explanation for explaining the necessary things clear

    • @statquest
      @statquest  7 місяців тому

      Glad you liked it!

  • @konata_fan
    @konata_fan Рік тому +6

    Genial, muchísimas gracias.

  • @chairlovawitabat
    @chairlovawitabat Рік тому +1

    Looove this. Thx so much. Needs more stargazer 😎

  • @tabarakalmosawi6659
    @tabarakalmosawi6659 3 місяці тому +1

    Thank you very very much. this was super helpful

  • @bruhmomento6691
    @bruhmomento6691 8 місяців тому +1

    Damn, this was fun!

  • @jonwelsh4354
    @jonwelsh4354 Рік тому +1

    Thank you!

  • @Nothingimportant1
    @Nothingimportant1 Рік тому

    Nice, thanks. Next one, try to carry out a test with examples and interpret its result. Grazie tanta.

  • @Sami-or7gm
    @Sami-or7gm 3 місяці тому +1

    Thank you so much

  • @live.through.dance.
    @live.through.dance. Рік тому +2

    If we have multiple X features, does the p-value in last line (line corresponding to F-statistics) refer to multiple testing p-value for all X features' coefficient?

    • @statquest
      @statquest  Рік тому +4

      The F-statistics test the model as a whole, so it is only one test. And that means it doesn't factor in multiple testing.

    • @live.through.dance.
      @live.through.dance. Рік тому +1

      @@statquest Gotcha! Thank you:)
      Your videos are really helpful thank you so much!!

  • @AVATARML2004
    @AVATARML2004 7 місяців тому +1

    THANK YOU!!!

  • @sharmi5715
    @sharmi5715 Рік тому +2

    i love statQuest

  • @markobe08
    @markobe08 Рік тому +3

    Statquest is the best

  • @zerohero5631
    @zerohero5631 Рік тому +2

    Hello doctor thanks you🎓🎓🎓👍👍👍💖💖💖

  • @shamilmowlana8849
    @shamilmowlana8849 2 місяці тому

    Nice video. What do you think about checking the model by verifying the assumptions for residuals. I.e, normality, independence, zero mean and constant variance

    • @statquest
      @statquest  2 місяці тому

      You can definitely do that if you want.

  • @DuyNguyen-so9of
    @DuyNguyen-so9of 2 місяці тому +1

    For the Std. Error of the Coefficients, its significant level would be 5% right? If not, how can I know it?

    • @statquest
      @statquest  2 місяці тому

      The standard cutoff is 0.05, or 5%.

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

    Thank you Josh - these videos are so helpful.
    Is there a statistical test for this question: "is the slope coefficient of a linear regression model equal to 1?"
    The context is for a quantitative test, comparing it to a series of analytes of known quantity.
    I'd like to know if the test has a bias, e.g. it over-quantitates higher concentrations (or under-quantitates lower concentration samples)
    Thanks again

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

      I don't believe that there is one, but you can plot the residuals and see if you see a bias there (the residuals should be normally distributed - and you can test that with something called a K-S Test).

  • @chiaraamitrano5370
    @chiaraamitrano5370 Рік тому

    I love StatQUest. Can you please explain how to show the equation or at least the R2 on the plot? pleaseeee

    • @statquest
      @statquest  Рік тому

      If you want to add text to a plot, you can use the text() function. stat.ethz.ch/R-manual/R-devel/library/graphics/html/text.html

    • @chiaraamitrano5370
      @chiaraamitrano5370 Рік тому

      @@statquest thank you!!

  • @sevent1116
    @sevent1116 8 місяців тому

    Nice video, but when I enter the last line of code it doesn't show me a line? It doesn't show me an error either

    • @statquest
      @statquest  8 місяців тому

      Did you type it in yourself or did you download my code? I just reran my code and it worked fine.

  • @ryanperkins1525
    @ryanperkins1525 Рік тому +1

    quality.

  • @pofgaia2939
    @pofgaia2939 8 місяців тому

    thank you but itd be better if you had a better microphone

    • @statquest
      @statquest  8 місяців тому +1

      Thanks! These days I have a much better microphone.

  • @neilpb3712
    @neilpb3712 Рік тому +2

    First one

  • @airinbappi7807
    @airinbappi7807 7 місяців тому

    I hateee😂

  • @trolltoll440
    @trolltoll440 Рік тому

    i dislike statquest

  • @hannukoistinen5329
    @hannukoistinen5329 Рік тому

    You are a way off mister. You start with a normal probability testing. I suggest some statistical classes.

    • @statquest
      @statquest  Рік тому

      You can skip that step, if, later on, you look at the residuals, which we do.