Linear regression using R programming

  Рет қаралды 96,154

R Programming 101

R Programming 101

Күн бұрын

Simple linear regression models using R programming doesn't need to be scary. This video will take you through the basics of how to interpret linear regression results and the code needed to do the regression models. If you are learning regression modelling or just learning statistics and quantitative analysis then this is a good place to start. Data science and research often address questions by looking at how much of a change in one variable can be explained by a change in another. Linear models are used to answer this question. They can also be used to predict the value of one variable given the value of another. I also go through how to use the predict function in R.

Пікірлер: 99
@muhammedhadedy4570
@muhammedhadedy4570 2 жыл бұрын
No words can thank you enough for these videos. You are the best R teacher I've ever seen.
@RProgramming101
@RProgramming101 2 жыл бұрын
That’s very kind of you to say. Thanks a lot.
@xAccident
@xAccident Жыл бұрын
Thanks! I haven't programmed in R in roughly two years, and I needed to catch-up on programming in R Studio for a university project, so your video was excellent for that purpose. Appreciate your content.
@RProgramming101
@RProgramming101 Жыл бұрын
That's so great to hear - thanks. You got this!
@evaashby3460
@evaashby3460 Жыл бұрын
This good stuff! Thank you. Great explaining of what regression is and what each part of the formula means! Thanks a million!
@paulinaandrade1915
@paulinaandrade1915 Жыл бұрын
Thank you! you are great at explaining the concepts and applications on this type of analysis and you also make it so easy to learn how to use this information in R data analysis! Please keep making more videos!
@RProgramming101
@RProgramming101 Жыл бұрын
Glad you like them! Yes indeed, more to come!
@huyquach5044
@huyquach5044 2 жыл бұрын
Thank you very much for your easy-to-understand videos. Appreciate your time as well.
@RProgramming101
@RProgramming101 2 жыл бұрын
You are most welcome
@pipertripp
@pipertripp 2 жыл бұрын
Great vid. I've been working through the famous ISLR for a few months now and it's nice to revisit the earlier material with a great video like this. It's good to follow along and to try to anticipate where you're going with it. Just shows that even if you're not completely new to the subject, videos like this can be very helpful. Looking forward to the markdown video. I've been creating R notebooks for my own learning and they're great.
@RProgramming101
@RProgramming101 2 жыл бұрын
Glad you liked it! Thanks for the feedback!! :)
@QueenCasopia1
@QueenCasopia1 Жыл бұрын
11😊
@yazz4ya
@yazz4ya 11 ай бұрын
I absolutely love your material. It's helping me get out of using stupid SPSS and into R.
@RProgramming101
@RProgramming101 11 ай бұрын
I'm glad my videos resonated with you and you found it relatable. Thanks for sharing your experience.
@BulLiT2401
@BulLiT2401 2 жыл бұрын
Thank you so much 🙏 I'm always looking forward to seeing your videos. It's always very very understandable
@RProgramming101
@RProgramming101 2 жыл бұрын
Thanks for the feedback (much appreciated).
@domillima
@domillima Жыл бұрын
I am already subscribed and like each of your videos that I watch. Sincerely, if there was a SUPER LIKE, no one would deserve it more than you. Cheers on the fantastic content and your natural teaching ability.
@RProgramming101
@RProgramming101 Жыл бұрын
Wow, So nice of you to say, Danly - thanks for the great feedback!!
@andresrengifo7801
@andresrengifo7801 2 жыл бұрын
Simple, practical and with R...thanks
@RProgramming101
@RProgramming101 2 жыл бұрын
You're welcome!
@gianluca.pastorelli
@gianluca.pastorelli 2 жыл бұрын
Another great video! Looking forward to watching your R Markdown tutorial
@RProgramming101
@RProgramming101 2 жыл бұрын
Thanks. Will publish soon (this week I hope)
@kukuab1795
@kukuab1795 2 жыл бұрын
Thank you I can’t wait to see your next video 🙏
@RProgramming101
@RProgramming101 2 жыл бұрын
That's kind of you to say :) thanks!!
@billgoodman3537
@billgoodman3537 4 ай бұрын
Really nice explanation of residuals
@oscarsibanda9454
@oscarsibanda9454 6 ай бұрын
Awesome, I’m working on a R project & your videos are a great help.
@RProgramming101
@RProgramming101 5 ай бұрын
Great to hear!
@jrichalot
@jrichalot Жыл бұрын
amazing and efficient as always. Thanks. Really enjoying your videos.
@RProgramming101
@RProgramming101 Жыл бұрын
Wow, so great to hear! Thank you!!
@iancg1
@iancg1 Жыл бұрын
Awesome video! I hope you could do one on multiple regression, specifically about model building strategies since that’s not really well discussed in texts. Thank you!
@RProgramming101
@RProgramming101 Жыл бұрын
Great suggestion! Thank you for your feedback!
@kyrshan3433
@kyrshan3433 Жыл бұрын
Seconded. Btw great series 🎉
@filipk3207
@filipk3207 2 жыл бұрын
Keep up the awesome work!!!
@RProgramming101
@RProgramming101 2 жыл бұрын
Thanks! Will do!
@oromokomacharles1751
@oromokomacharles1751 Жыл бұрын
Thank you for the precise videos giving very clear explanations on each step to be taken. Please do a tutorial on Factor analyses (PCA, PCoA etc).
@RProgramming101
@RProgramming101 Жыл бұрын
Great suggestion! Thank you for the feedback. Glad you enjoyed it! ☺
@bacayans.b3733
@bacayans.b3733 Жыл бұрын
Superb video.
@martinabautista
@martinabautista 4 ай бұрын
Good video man! Thanks
@PeloquinDavid
@PeloquinDavid 3 ай бұрын
I came here mostly to brush up on my OLS syntax in R, particularly what kinds of data objects (vectors/matrices, data frames, etc.) the function expects to see. (It's the kind of thing that easily slips away from me if I'm not constantly using the software...) I know this is a simplified explanation (and a good one too!), but in a model like this, if the intercept term were statistically significant at conventional cut-off levels (it isn't here), it would be evidence - along with things like asymmetric residuals - that the model was mis-specified (i.e. that it didn't capture the theoretically plausible functional form of the relationship). No doubt other videos in the playlist will go into how to detect mis-specification and what kinds of changes to the model might be warranted.
@raquelbaeta497
@raquelbaeta497 Жыл бұрын
Would it be possible if you could do a multiple regression with an anova test (to find which model is a better fit), and explain how to interpret the output?
@hazellu749
@hazellu749 Жыл бұрын
Nice explanation, thank you!
@RProgramming101
@RProgramming101 Жыл бұрын
Glad you enjoyed it! Thanks.
@Ryan_Daley
@Ryan_Daley 2 жыл бұрын
Thank you for your videos, they have been very useful with getting to grips with my course! Will videos on multiple and logistic regression be released in the future?
@RProgramming101
@RProgramming101 2 жыл бұрын
Thanks for the comment. Glad you like the videos. Yes I'll create videos on logistic regression and multiple regression soon.
@achrafcherkaoui1566
@achrafcherkaoui1566 2 жыл бұрын
that is a great video, I would like to see you explaining other statistical methods like PCR, RANDOM FOREST, LOSSO, RIDGE KNN, ... etc. thank you for your effort I really enjoy watching your videos.
@RProgramming101
@RProgramming101 2 жыл бұрын
Great suggestion!
@bocherabrahmi8111
@bocherabrahmi8111 Жыл бұрын
thank you so much for your help your videos are just amazing.good luck
@RProgramming101
@RProgramming101 Жыл бұрын
So nice of you. Thank you for the amazing feedback!
@madhavanand2787
@madhavanand2787 9 ай бұрын
That's a very nice explanation of a simple linear model so far I've seen. I have one question. How do we know that the slope or the model is a good fit to predict any x value by looking at the P value? Is it like how close the P is to 0, the better model it is?
@88pianissimo90
@88pianissimo90 6 ай бұрын
Thanks for sharing this amazing knowledge.
@88pianissimo90
@88pianissimo90 6 ай бұрын
I am an SAP consultant working on finance domain and I have actually started realizing how much useful this could be. Hopefully I will be able to apply this knowledge in my domain.
@88pianissimo90
@88pianissimo90 6 ай бұрын
Apart from slope, Y-intercept & p-value, there are many other numbers in the model output... Can you please explain them?
@intesartaieb8590
@intesartaieb8590 Жыл бұрын
Great toturial, NOW I got what's going on
@RProgramming101
@RProgramming101 11 ай бұрын
I'm thrilled to hear that. Thank you for letting me know!
@anonymouslycorrect1
@anonymouslycorrect1 11 ай бұрын
Thank you!❤ finals are due Saturday!
@bridgettsmith7206
@bridgettsmith7206 Жыл бұрын
Thank you for the video
@RProgramming101
@RProgramming101 Жыл бұрын
Thanks for watching!
@benlance97
@benlance97 7 ай бұрын
Super informative video almost exactly what I was looking for, a few things that would be of interest, formal studies have a sort of lack of focus on the R script writing, post grad studies seem to have an assumed knowledge regarding how you write R script, great functions are provided but how do they work in the script or more importantly how do you use them , took me way to long to apply lables to my data when importing it and creating my own data sheets for analysis. I'd be more interested in data that is created as in how do you go from a spreadsheet from field data or surveys, like the data hospital staff collect on patients in hospital charts or pharmacy tests or environmnetal studies that have multiple often correlated or covaried data into a format appropriate for R to analyse like the iris data that is built in. like you've done the examples on how to analyse these inbuilt data from starwars or this car speed data... lets go the next step..., your perfoming your own study where you've gathered various data lets go through how to set up this possibly ugly massive dataset into a format before it becomes a monster to plug in so we can analyse it. I'm still a noob with R, your videos are brilliant and said in a manner that is simple and concise and not overly mathematical. unlike Rs user manuals and examples.
@haraldurkarlsson1147
@haraldurkarlsson1147 2 жыл бұрын
I am looking forward to the presentation on RMarkdown. Hope you explain the difference between R Note book and RMarkdown! Thanks!
@RProgramming101
@RProgramming101 2 жыл бұрын
Will do!
@legiegrieve99
@legiegrieve99 5 ай бұрын
Thanks for this video. well explained 🤩 You posted this in 2022 and I am benefitting in 2024. 😍
@RProgramming101
@RProgramming101 5 ай бұрын
Wonderful!
@ManuelLopez-ej8sn
@ManuelLopez-ej8sn 2 жыл бұрын
Ì tried to reproduce the graph. Is there a better way to: 1) Left align the annotation and 2) Import the values of the y intercept, slope, p-value and r2 in the annotation? Thank you! 😊 cars %>% filter(dist < 110) %>% ggplot(aes(speed, dist))+ geom_point(colour= "red")+ geom_smooth(method = "lm", se = 0)+ theme_bw()+ annotate("text", x= c(9.15, 8, 8.2, 7.7), y= c(90, 80, 70, 60), label=c ("Y intercept = -17,5", "Slope = 3,9", "p = 1.49e-12", "R2 = 0,65"), colour = "blue")+ labs(title = "The relationship between speed and stopping distance")
@muhammedhadedy4570
@muhammedhadedy4570 2 жыл бұрын
I would like to ask you - when you explain logistic regression - that you would make a video on multiple logistic regression. I believe you would explain it very well.
@RProgramming101
@RProgramming101 2 жыл бұрын
Thanks. Will do my best.
@PublicHealthResources
@PublicHealthResources 2 жыл бұрын
This is an awesome video sir. I love the annotations on your videos. Please what software do you use to make such annotations? This will really help my videos too. Thank you Greg. By the way you are a big inspiration to my channel😊
@RProgramming101
@RProgramming101 2 жыл бұрын
happy to connect with you about this. I've just checked out your channel - great job - lovely resource!
@PublicHealthResources
@PublicHealthResources 2 жыл бұрын
@@RProgramming101 Wow!!! I am super honored to hear this from you. You are my superhero 😊. I will send you a mail to connect. By the way sir you have inspired (and continue to inspire) thousands of Medical students and researchers in my country and continent! We love you sir. Thank you for all you do
@brandendavenport5803
@brandendavenport5803 Жыл бұрын
I love your videos! Is there any way you can do a video on time series analysis?
@RProgramming101
@RProgramming101 Жыл бұрын
Thank you for the feedback and suggestion. Glad you enjoyed it!
@deraessonna3444
@deraessonna3444 Жыл бұрын
Great video! Thanks a lot for sharing but can the sound quality be improved on, I often struggle to hear as I watch the videos. Thanks again for sharing
@edmundyiu539
@edmundyiu539 2 жыл бұрын
May I ask whether there is any update on the markdown video? How to export the regression output table to word, excel, etc. ?
@sciencefliestothemoon2305
@sciencefliestothemoon2305 2 жыл бұрын
Question regarding the data = ., so that means if not written in this example, R would slot the df at the beginning, turning the df into the dependend variable? Hence using data = ., the function defines the variables first then looks them up in the df?
@haraldurkarlsson1147
@haraldurkarlsson1147 2 жыл бұрын
Great! Quick question. Is the last set of code with nested operations a so-called "windows function"?
@RProgramming101
@RProgramming101 2 жыл бұрын
I'm not sure but will try to find out for you
@badermuteb4552
@badermuteb4552 11 ай бұрын
how did you create the plot?
@testforall555
@testforall555 Жыл бұрын
Can you elaborate more on what is p hack or how to define alpha before the experiment. I am from biology and sorry if i added this comment to the wrong video. And thanks a lot for your videos (subscribed). Mohamed
@deltax7159
@deltax7159 5 ай бұрын
I know this is not a very technical question and I see which theme you use, but im wondering if you have used other editor theme's, which you prefer best and why do you choose to use the theme you show in all of your videos?
@WmRLoughran
@WmRLoughran Жыл бұрын
where is the viedo where i can learn how to put the y intercept, slope, R2 ect..
@user-pu9ll7vd5m
@user-pu9ll7vd5m 3 ай бұрын
Don't know how to have a lm diagram (at Plots). Anyway, it's great content on this. Thanks -
@FatGuyInALittleCoat1
@FatGuyInALittleCoat1 10 ай бұрын
Interesting using a social science/statistical methodology on this data set. Wouldn’t this be more a physics question? Objects in motion and measuring the effort it would take to stop? A disturbance term in this model would be the weather conditions, I would add in data set of 1 and 0, 1= rain in forecast that day and 0 = no rain in forecast
@mustahedinhoque4430
@mustahedinhoque4430 Жыл бұрын
Sir please Make a video ##Meta analysis**
@gianluca.pastorelli
@gianluca.pastorelli 2 жыл бұрын
The video on R Markdown never showed up ☹️
@user-zj7cr2pg7c
@user-zj7cr2pg7c 7 ай бұрын
Perfect video, watched 2023.11.10
@mustahedinhoque4430
@mustahedinhoque4430 Жыл бұрын
Sir make a video about #Meta analysis in R #Meta analysis in R
@ramielshazli7329
@ramielshazli7329 2 жыл бұрын
Thank for your videos could you please make a video how to draw linear regression using ggplot
@RProgramming101
@RProgramming101 Жыл бұрын
Great suggestion! Thank you for the feedback.
@Jefremd
@Jefremd 2 жыл бұрын
How do I command R to make the linear graph you presented ?
@gianluca.pastorelli
@gianluca.pastorelli 2 жыл бұрын
Watch his videos about scatter plots with ggplot and you'll learn everything you need
@stuartfechhelm553
@stuartfechhelm553 2 жыл бұрын
How would you plot an lm model using ggplot?
@RProgramming101
@RProgramming101 2 жыл бұрын
I'll make a video about that
@KenjiFPV
@KenjiFPV 2 жыл бұрын
Can we get access to your programming code? Do you post it somewhere?
@RProgramming101
@RProgramming101 2 жыл бұрын
hi there - I'm going to make my code available at www.learnmore365.com (some of it is there already)
@KenjiFPV
@KenjiFPV 2 жыл бұрын
@@RProgramming101 thanks! Much appreciated!
@homataha5626
@homataha5626 Жыл бұрын
don't you publish the code?
@tiisunti178
@tiisunti178 Жыл бұрын
May i say. Your video is very nice and useful, but you always use the data in R, i think better to use the data that you creat it yourself and explan to save it in .csv file at the same time, that will be easy to understand because when we practice some times confusse with eg. "head, car..." hence what is head? what is cars?,etc. that really confuse and complicate when practice
@user-cg9cf4mk6e
@user-cg9cf4mk6e 10 ай бұрын
i hav same paintik
@user-cg9cf4mk6e
@user-cg9cf4mk6e 10 ай бұрын
oo yes
@michaeldillman1660
@michaeldillman1660 2 жыл бұрын
The weird added music ruined it
Learn Statistical Regression in 40 mins! My best video ever. Legit.
40:25
Simple Linear Regression.
16:38
R Programming 101
Рет қаралды 4 М.
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 871 М.
Tom & Jerry !! 😂😂
00:59
Tibo InShape
Рет қаралды 52 МЛН
Can teeth really be exchanged for gifts#joker #shorts
00:45
Untitled Joker
Рет қаралды 16 МЛН
t-test and interpreting p values using R Programming
26:53
R Programming 101
Рет қаралды 84 М.
Multiple linear regression using R studio (Aug 2022)
33:49
Mike Crowson
Рет қаралды 20 М.
Linear Regression, Clearly Explained!!!
27:27
StatQuest with Josh Starmer
Рет қаралды 217 М.
Statistics 101: Linear Regression, The Very Basics 📈
22:56
Brandon Foltz
Рет қаралды 1,9 МЛН
Linear Regression in R, Step by Step
5:01
StatQuest with Josh Starmer
Рет қаралды 71 М.
Adding variables to your multiple regression model
28:40
R Programming 101
Рет қаралды 3,3 М.
Linear Regression Summary in R
10:05
Dataslice
Рет қаралды 57 М.
Multiple Regression from beginning to end in 30 minutes.
33:07
R Programming 101
Рет қаралды 10 М.
Clean your data with R.   R programming for beginners.
27:31
R Programming 101
Рет қаралды 135 М.
Regression Analysis | Full Course
45:17
DATAtab
Рет қаралды 777 М.