Simple Linear Regression in R | R Tutorial 5.1 | MarinStatsLectures

preview_player
Показать описание


How to fit a Linear Regression Model in R, Produce Summaries and ANOVA table for it.

◼︎ What to Expect in this R video Tutorial:

► learn when to use a regression model, and how to use the “lm” function in R to fit a linear regression model for your data
► learn to produce summaries for your regression model using “summary” function in R statistics software; these summaries can include intercept, test statistic, p value, and estimates of the slope for your linear regression model
► become familiar with the Residual Error: a measure of the variation of observations in regression line
► learn to ask R programming software for the attributes of the simple linear regression model using "attributes" function, extract certain attributes from the regression model using the dollar sign ($), add a regression line to a plot in R using "abline" function and change the color or width of the regression line.
► this R tutorial will also show you how to get the simple linear regression model's coefficient using the "coef" function or produce confidence intervals for the regression model using "confint" functions; moreover, you will learn to change the level of confidence using the "level" argument within the "confint" function.
►You will also learn to produce the ANOVA table for the linear regression model using the "anova" function, explore the relationship between ANOVA table and the f-test of the regression summary, and explore the relationship between the residual standard error of the linear regression summary and the square root of the mean squared error or mean squared residual from the ANOVA table.

►► Watch More:

◼︎ Table of Content:

0:00:07 When to fit a simple linear regression model?
0:01:11 How to fit a linear regression model in R using the "lm" function
0:01:14 How to access the help menu in R for any function
0:01:36 How to let R know which variable is X and which one is Y when fitting a regression model
0:01:45 How to ask for the summary of the simple linear regression model in R including estimates for intercept, test statistic, p-values and estimates of the slope.
0:02:27 Residual standard error (residual error) in R
0:02:53 How to ask for the attributes of the simple linear regression model in R
0:03:06 How to extract certain attributes from the simple linear regression model in R
0:03:40 How to add a regression line to a plot in R
0:03:52 How to change the color or width of the regression line in R
0:04:07 How to get the simple linear regression model's coefficient in R
0:04:11 How to produce confidence intervals for model's coefficients in R
0:04:21 How to change the level of confidence for model's coefficients in R
0:04:38 How to produce the ANOVA table for the linear regression in R
0:04:47 Explore the relationship between ANOVA table and the f-test of the linear regression summary
0:04:55 Explore the relationship between the residual standard error of the linear regression summary and the square root of the mean squared error or mean squared residual from the ANOVA table

This video is a tutorial for programming in R Statistical Software for beginners, using RStudio.

Follow MarinStatsLectures

Our Team:
Content Creator: Mike Marin (B.Sc., MSc.) Senior Instructor at UBC.
Producer and Creative Manager: Ladan Hamadani (B.Sc., BA., MPH)

These videos are created by #marinstatslectures to support some courses at The University of British Columbia (UBC) (#IntroductoryStatistics and #RVideoTutorials for Health Science Research), although we make all videos available to the everyone everywhere for free.

Thanks for watching! Have fun and remember that statistics is almost as beautiful as a unicorn!
Рекомендации по теме
Комментарии
Автор

And sir we are a bunch of Post grad students and learned the R programming merely watching and following ur tutorials. for that we really are grateful to you.

Автор

Hi Mike,

I check your YouTube site regularly and ALWAYS find great information there. I work with college faculty at various institutions (mostly Chiropractic Colleges) to train faculty to be informed consumers of the research literature. Some also go on to become research producers. I also work with them.

An essential part of the training I provide is instruction in statistics concepts and guidance on how to use that understanding when reading journal articles. As informed research consumers they must be capable of giving appropriate critical attention to the study design, analysis plan, and results.

Of course, those that go on to become research producers have even greater need to understand statistics and study design.

Your excellent site provides inspiration and clarification that I use frequently.

Thanks for your good work!

Chuck

charleshenderson
Автор

I'm on my first steps in R and your videos are quite a great support. Many thanks, from Mozambique!

danielzacarias
Автор

You have explained in the proper statistical way. Thank you so much. Plz keep the good work going.

flamboyantperson
Автор

You such a good teacher ever I seen. Many many thanks sir

shamsuzzoha
Автор

Michael,
Thanks for the video sessions. For someone getting his hands dirty with R for the first time they are very useful.
Dídac

didacartes
Автор

Loved this short simple to the point video. I could not understand what I was taught in class.. This video just took 5 minutes and showed me what to do..Thanks for being so clear and concise. and to the point...

ranimaharaj-sharma
Автор

Thanks Fahd! Glad you're finding them helpful!

marinstatlectures
Автор

this video was thorough and well-paced! Thank you :)

reubenchemmanam
Автор

Great series Mike and Ladan. Really enjoyed watching all the videos. Looking forward to the next series. -Pedram

PedramRezaei
Автор

Excellent video. Really helped drive these concepts home and showed me specifically what I need to study. I guess I should view all your R videos in order from the beginning. Thank you for the great work!

joerouse
Автор

thanks for the video, I'm new to R and this vid was a huge help

faridsanchez
Автор

This video is pure gold! I have been struggling with lm and you just made it so easy! Thank you very much 😀

NellieNilsen
Автор

Thank you for providing explanations that my stats professor apparently didn't think were very important.

RobFS
Автор

thank you so much; i had been struggling to correct my commands for hours !

nothingsintheflowerz
Автор

brilliant tutorial mate, you have my statistical equivalent of a thanks!

grassfedgains
Автор

Thank you Mike for sharing your knowledge with us. I have really learnt a lot from your videos. I am now making nice plots with R. Many thanks:).

majidosman
Автор

that baby voice at the and crank me up :))) by the way great content !!!

diallo
Автор

Very helpful video! I never learned R in school even though I took courses on Statistics and Econometrics. I used Stata but I wanted to become familiar with R for fun and to learn a new programming language.

bradmorgan
Автор

Thanks for all videos, I am introduced to R successfully with your shares

alexdesouza