learnr::run_tutorial(
name = "LinearRegression1",
package = "DataScienceExercises",
shiny_args=list("launch.browser"=TRUE))๐๏ธ Session 10: Linear regression and experiments in R
This session focuses on the practical implementation of linear regression models and on how to conduct the most common tasks associated with designing and implementing experiments in R.
This way it complements the more theoretical lectures. More precisely, we focus on the following topics:
- Implement simple and multiple linear regression in R
- Calculate and interpret \(R^2\) manually and using
Rfunctions - Understand and demonstrate omitted variable bias
- Perform data transformations to linearize relationships
- Create effective visualizations using
geom_smooth() - Conduct basic model diagnostics
- Implement a power analysis in R
๐ Mandatory Reading
- The tutorial Linear Regression in R
- The tutorial Experiments in R
Further Reading
In-class exercises
โ๏ธ Coursework
- Complete the in-class exercises at home
- Do the exercises
LinearRegression1andLinearRegression2from theDataScienceExercisespackage
TipQuick code for starting the exercises I
TipQuick code for starting the exercises II
learnr::run_tutorial(
name = "LinearRegression2",
package = "DataScienceExercises",
shiny_args=list("launch.browser"=TRUE))References
Ismay, C. and Kim, A. Y.-S. (2020) Statistical inference via data science: A ModernDive, into R and the tidyverse, Boca Raton: CRC Press, Taylor and Francis Group, available at https://moderndive.com/index.html.