Multiple Linear Regression in R
HTML-код
- Опубликовано: 12 июл 2024
- This video provides a simple example of doing multiple linear regression analysis in R.
Data file: github.com/bkrai/R-files-from...
GitHub: github.com/bkrai/Top-10-Machi...
Topics covered
00:00 What is multiple linear regression?
02:03 Developing Multiple linear regression model in R
05:25 Results and regression equation
06:33 Explanation about summary of the model
11:15 Final model
12:00 Comparing full and reduced model using ANOVA
12:55 ANOVA
14:20 Prediction with confidence interval
Machine Learning videos: goo.gl/WHHqWP
Becoming Data Scientist: goo.gl/JWyyQc
Introductory R Videos: goo.gl/NZ55SJ
Deep Learning with TensorFlow: goo.gl/5VtSuC
Image Analysis & Classification: goo.gl/Md3fMi
Text mining: goo.gl/7FJGmd
Data Visualization: goo.gl/Q7Q2A8
Playlist: goo.gl/iwbhnE
R is a free software environment for statistical computing and graphics, and is widely used by both academia and industry. R software works on both Windows and Mac-OS. It was ranked no. 1 in a KDnuggets poll on top languages for analytics, data mining, and data science. RStudio is a user friendly environment for R that has become popular.
let's take a moment to appreciate this man..he is doing such a great work to educate us 🙏
Thanks for your comments!
Your tutorials are the best! You don't leave out any small detail! Thank you for making these!
Thanks for your comments!
Truly thank you from the bottom of my heart. Such a clear and well explained lesson!
You're very welcome!
wow! It's easy to follow. You explained it clearly and in an easy way. Thanks a lot! It helps me a lot.
Thanks for your comments!
Dear Dr. Rai, I am really thanking you from my whole heart for making these kind of informative tutorials in R. I have been struggling since many days to find a good tutorial on Rstudio. May God bless you. Already subscribed and hoping to see more videos from you..
Regards, Dr. Anand
Thanks for your feedback and comments!
Every time I repeat watching those videos, I really learn something new. Baharat is doing a marvellous work.
Thanks for the feedback!
You are an excellent tutor.
Thank you for saving me time and money.
Thanks for comments!
Your presentation is complete and easy to follow. The calm in your voice makes it easier to understand. I appreciate very much the technic suggested by tacking notes in a Wordpad, it is very useful!! A suggestion... For more in-depth knowledge it would be interesting to add analysis of CI and so on
Thanks for comments!
Thank you Dr.Bharatendra. This visual explanation has cleared a lots of ambiguities which I had in regards to MLR. Thanks for sharing the info.
You're most welcome
The most amazing lessons I have learnt and thanks a ton for the detailed explanation.
You're very welcome!
Thank you so much Sir. I really understood multiple linear regression seeing this specific video of yours. I appreciate all your help to beginners like me.
You are most welcome!
Very lucid and clear . Easily understood by even a beginner.
Thanks for the comments! :)
Excellent way of teaching. Much appreciated
Thanks for comments!
Dear sir,
Your are simply awesome and effortless way of teaching .
Thanks for comments!
Fantastic tutorial...Thank you.
This is awesome. You left me speechless!!!
Thanks for comments!
Very clear explanation! thanks for this video
Thanks! You may find this series useful too:
ruclips.net/p/PL34t5iLfZddspfUiv-9EaOVNUG64_fwFq
Thank you so much for a very informative video shot
Thank you so much! Extremely well explained.
You are welcome!
Very Detailed Explanation.. Thank you Sir.
Thanks for comments!
Wow you delivered it the easiest way bro. Thnaks Dr.
Glad it was helpful!
Easy to understand. Many many thanks
Thanks for comments!
When Dr. Bharatendra publish a video , the probability for success is significant!
Thanks for comments!
absolutely useful explanation. Thank you so much :)
Thanks for comments!
Thank you very much sir for the great detail explanation
You are welcome!
you are amazing teaching ,thank you so much
Thanks for comments!
one of the best tutorial online
Thanks for comments!
It's so helpful.thank you sir.
You are very welcome!
great video and easy to follow . Thank you
Thanks for comments!
As usual enjoyed it!! Thanks
Thanks for comments!
Thank you sir, very well explained.
You are welcome!
well explained, thanks
very well explanation sir..! thank you
Thanks for comments!
Thank you so much it is really helpful
Thanks for comments!
Thank you very much
You really saved my life
Glad to hear that!
really liked it ! please do more videos
Thanks for comments! You can find some more videos from this link:
ruclips.net/p/PL34t5iLfZddv8tJkZboegN6tmyh2-zr_T
Such a precise and clear explanation! Can I take this opportunity and request you to make a video on building multiple linear regression models using train and test data. This will be very helpful. Thank you for your efforts in making us educated.
Thanks for your comments and suggestion!
nice explanation :)
very good video, thank you!
You are welcome!
great video sir thank you so much
Thanks for comments!
Great teaching video sir, We like learn from you remaining ML methods such as SVR,SVM etc.
Thanks for the feedback! I'll keep SVR & SVM in mind for future.
Here is the link to SVM:
ruclips.net/video/pS5gXENd3a4/видео.html&list=PL34t5iLfZddtII4ssT8FSUFP27fPYDEhY&index=25
thanks a lot sir, you are a great teacher i have ever seen.
thank you. this is so great.
You're very welcome! Here is a new link:
ruclips.net/p/PL34t5iLfZddspfUiv-9EaOVNUG64_fwFq
you are definitely one of the best tutors on youtube. you are too GOOd!!!!!
Thanks for comments!
This video is very useful ☺
Thanks for comments!
Thank you so much, sir.
You are most welcome!
very helpfull vedios
great explanation sir...thanks alot...
Thanks for comments!
my pleasure sir...i cant explain how much ur lecture help me for my m.tech project.
That's good to know!
Sir, really doing a great job all your videos are just amazing. Do you have any video on canonical correlation?
Not yet, I've added it to my list.
Thank you so much.
Always welcome! You may also this useful:
ruclips.net/p/PL34t5iLfZddspfUiv-9EaOVNUG64_fwFq
you are great sir.. luv uu
Thanks for comments!
This is really great work. How can one do the same for a series of raster files?
For purposes of prediction
awesome sir
Thanks for comments!
These videos are great! But I'd like to see the process that brought you to the three variables you chose to start.
You may find more details in this recent series:
ruclips.net/p/PL34t5iLfZddspfUiv-9EaOVNUG64_fwFq
So helpful..5 star
Very easy to follow...thank you so much.. Where i can get the PDF you have mentioned at the end?
Thank you sir
You are welcome!
He is the best .
Thanks for comments!
Mr. Bharat, do you have any video explaining the four plots when using plot(model) for the same dataset?
Thank You
Welcome!
Thankyou. This is really helpful in understanding the basics..
Do you have any next version to this also?
I was looking forward to understand the role of log in multiple regression in R.
Regards.
This video used R for regression. There is another one on simple linear regression that you may find useful:
ruclips.net/video/iXviEYy_DGg/видео.html
Ok Thankyou!
Hello Sir, I was going through your videos.. You explained it in a very simple way and very easy to understand. Can you please suggest if there are any datasets which we can use to practice R Also the vehicle data which you are using, can you send me that as well... Once again sir, great initiative....
You can get vehicle data file from this link:
drive.google.com/open?id=0B5W8CO0Gb2GGUVNyZ1JqMW1NZjA
You can also refer to following for data within R:
ruclips.net/video/FDLY8GQ69dA/видео.html
sir thank you very much for sharing this video. can you help me to share the fuzzy logic model in landslide vulnerability mapping analysis?
Thanks, I've added it to my list.
Hi Sir ,Great Video .Can u please explain about the other metrics like Residual standard error ,and difference between Multiple R2 and Adjusted R2 and which value to consider.
You can get some more insight from this link:
ruclips.net/video/iXviEYy_DGg/видео.html
Hello sir your work is very good , could ypu please show how to do EDA on a drug data set followed by modelling in R .
Thanks, I've added it to my list!
Great explanation, it was really helpful ! Where can I get the file with the example on house prices, which you mentioned at the end of the video ?
email id?
@@bkrai srijanmallick98@gmail.com
hi sir your explaining was really good i have a little doubt without vif calculations how your removed the mileage
It was removed as it was not statistically significant. You may also refer to this link for the latest:
ruclips.net/p/PL34t5iLfZddspfUiv-9EaOVNUG64_fwFq
Thank you very much for the wonderful video Dr. Rai. I have a problem statement. Is it possible to predict the independent variables from a given dependent variable? For example, if we get a multiple linear regression as y =a+b1x1+b2x2+b3x3, is it possible to do reverse regression with a given set of 'y' values, predict a, b1,x1, b2, x2, etc.?
You can run regression with the variable that needs to be predicted as 'y' variable.
@@bkrai the problem is to predict all possible independent variables ( maybe a range) using the given dependent variable.
Good explanation Bharat Sir... I did not got the vehicle csv file from the link you sent.
Here is the link:
drive.google.com/open?id=0B5W8CO0Gb2GGUVNyZ1JqMW1NZjA
May i know which models are good for the Regression problem? any of your videos in this regard?
You can refer to this playlist for more:
ruclips.net/video/s23CMIjfwHk/видео.html
How would you then create a new column in a new dataframe to predict the outcome for each row based on it's values, so you dont have to calculate them individually? What I did was using
newdataset$prediction
Yes, that should work fine.
THis guy is pretty good!
Thanks for comments!
Thank you so much sir, is there any way to measure accuracy for a linear regression model
RSME or R-sq based on actual and predicted values can be used for that.
@@bkrai thanks sir...
Hello sir, thank you for this valuable lecture. I want to ask about the confidence interval at 9:38 where you explained that the p-value is greater and so the confidence interval will be less than 95% for mileage. So the confidence interval which you were talking about , can you explain which confidence interval you are talking about specifically?
It's not confidence interval but I was taking about confidence level. For example, if level of significance of interest is 0.05 or 5%, that also means a confidence level of 0.95 or 95%.
@@bkraigot it sir thank you
You are welcome!
Hi. Is there any way to perform multiple linear regression on raster time series images?
What will be the conclusion, if p-value is significant(less than 0.05) while comparing two multilinear models using anova?
It will mean that by adding the variable in the full model, you are improving the model in a significant way. In other words, it is helping.
Very useful video Sir... Thank you very much!!! In my analysis, I am building different models for 4 outcome variables which are highly correlated (all r>0.9, different measures of infant body fat). But the significant predictor variables resulted in ANOVA comparison are different for each outcome. For example, maternal BMI is a significant predictor of infant body fat percentage (Pr(>Chisq)=0.03651 ), but not for infant fat mass (Pr(>Chisq)=0.2087). Sample sizes are the same for all the variables. Is this possible? If so, could you please let me know how I can explain this result?
That's certainly possible. It's not necessary for each outcome variable to behave in a same way with predictor variables.
Thank you so much!! Can I please get PDF file too
email id?
Sir after finding model and fitting linear equation. I need to forecast for future , for that how to automize in R. Can you give some example query sir like excel
For more details, refer to this:
ruclips.net/p/PL34t5iLfZddsiQ9PK2s3cd7LVd2FjOmIp
Dear Sir, easy to follow MLR concept and thanks for that. where I can download a "pdf" file which you mentioned in the youtube channel? thanks
email id?
Bharatendra Rai Dear Sir, rajaash@gmail.com
all set.
Sir, kindly make a separate video for multiple regression diagnostics of the residuals.🙏❤️
This playlist goes over it in greater detail.
ruclips.net/video/s23CMIjfwHk/видео.html
@@bkrai ❤️
Thank You ☺️
You are welcome!
Sir, can we transform the data of mileage into log transform and use it in our model....
Yes.
Sir can you please post a video on linear regression modelling on LungCapData?
the way we have been taught is a little more complicated.
And also i want to know why did you not do the sampling in this data? Shouldn't we be doing sampling, train and test for linear regression?
The process will be same as only names of the variables will change. Also no harm in splitting data into train and test if you have sufficiently large data.
Thanks Sir for your nice explanation. Today I came to know Sir where can I get the file "housing.txt" ? Can you please help me to get the file.
Here is the link:
www.rossmanchance.com/iscam2/data/housing.txt
@@bkrai
Sir I have a problem. I want to predict a target variable which is numerical and I have a 10000 observations.
But out of 10000 only 500 target variables are known. So can I replace the remaining 9500 with the mean of 500 and build a model or replace 9500 with mean of 500 and do a over sampling method?
Can you pls suggest me sir
Please can you make a tutorial about Mapreduce in Rhadoop framework?
Thanks for the suggestion, I've added them to my list.
Hi... Great video!! It is so easy to understand. Can I have the file about the multiple regression please so I can take a closer look at it?
+tuan le Heres my email address : tuan.le_94@yahoo.com.au
+tuan le Do you have any video about Logistic regression? If you do, can you please send me the link toward the video ? Thank you
+tuan le You can find R related videos here: ruclips.net/p/PL34t5iLfZddv8tJkZboegN6tmyh2-zr_T
+tuan le Sent the file just now.
+tuan le here is the link ruclips.net/p/PL34t5iLfZddv8tJkZboegN6tmyh2-zr_T
sir could u pls guide me through naive bayes in r with example?
Thanks for the suggestion, I'll add it to the list of future videos.
love you
Thanks for comments!
You explained Linear regression very well
Dear sir can I get that PDF which you had shown at last
email id?
varsha.nemade@nmims.edu
all set.
You mentioned a course website. What is this?
That's a course that I teach at UMass-Dartmouth.
Sir i have seen both linear and multiple linear regression videos but what should i consider as output which is significant.
Output variable or response variable is the one for which this model is being developed.
Sir, please tell me, how to write regression equation if I have multiple variables along with mileage (I mean lc~., ) here I want to use all the remaining variables as input variables.. So how can I write the regression equation.. Please tell me... Please sir
Refer to this playlist that goes into more details of multiple linear regression:
ruclips.net/video/s23CMIjfwHk/видео.html
Hi, is there a video where you talk about stationarity?
You can refer to time-series playlist:
ruclips.net/video/OJ3aeVBHAIk/видео.html
@@bkrai Thank you. You are doing great work!
Thanks for comments!
why to writ "head" before "vehicle" in starting of the command?
It is to look at first few rows of data. Probably you can review this link:
ruclips.net/video/FDLY8GQ69dA/видео.html
It is to see what the data look like and make easy to write the exact name of the variable in the data frame.
Sir where can i find the last paper u displayed?
Sir u should provide the vehicle data in description thanks u sir 👍👌👍👌👍👌👊👌
Added to the description area.
@@bkrai thank u very much sir for your support 😊😊😊😊 I appreciate u sir , and make more videos on r soft for agriculture
Thanks and have noted your suggestion!
@@bkrai thank you very much sir for this
how much data to split train and test data is there any condition for that. like 70% or 80% i have some doubts on decision tree sir
If you have lots of data, says in 1000s, then even a 50-50 split will be fine. But if you have a smaller dataset, then I would suggest 70-30 or 80-20.
For decision tree related question, I would suggest to post your comment there. It will avoid any confusion for other people.
When I do prediction for multiple variable regression using:
predict (results, data.frame(Mileage=1000, lh=1.2), interval='confidence')
I get a number of rows of values instead of just one value. What does it mean sir?
In the place of “results” put
lm(lc ~ Milage+lh)
and try, I hope it would be helpful.
you need to use lm(lc ~ Milage+lh) for both variables
Thank you so much for the explanation. Can you please share the vehicle.csv file?
Email id?
@@bkrai msandeepkumar93@gmail.com
all set.
@@bkrai Hi can you also please send the csv file to me: baybobjr@yahoo.com
Can you please share the CSV file to sachingupta.itm@gmail.com as well.
Hello Sir, Thanks for such a nice explanation. I am stuck with a project and I need to know one detail. I am trying to forecast sales which depends on 4 variables. I have formed the model. Now, I want all those 4 variables to predict the Y-hat values and create a new column containing the forecasted variables. So that we can calculate the residuals and estimate the model using MAPE, MAD etc. Can you continue to explain that using R-Codes please. I thank you in advance Sir.
Currently I'm preoccupied with a few things. But as soon as I get time, will work on it.
hii can i get the vehicle data set which you are using in these tutorials
+Akash Verma here is the link to data: dl.dropboxusercontent.com/u/50119580/vehicle.csv