filmov
tv
Simple Linear Regression in R | R Tutorial 5.1 | MarinStatsLectures
Показать описание
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!
Комментарии