Brief introduction and exploration into the relationship within data through the use of simple linear regression.
2024-09-22
Brief introduction and exploration into the relationship within data through the use of simple linear regression.
Let’s generate some data to go through the steps of simple liner regression
Before going through the steps of linear regression, it is important to visualize your data to ensure it fits the assumptions for simple LR, and to give yourself a general idea of how the data fits together.
If you visualize the graph, you can clearly see a positive linear relation between the independent and dependent variables
In the next slide, we can see the fitted model graphed in red, as a line of best fit through the data
## `geom_smooth()` using formula = 'y ~ x'