Introduction and Needed Packages

Learn about some basic regression techniques and how to get started with regression in R.

We'll cover the following...

Now that we’re equipped with data visualization skills, data wrangling skills, and an understanding of how to import data and the concept of a tidy data format, let’s now proceed with data modeling. The fundamental premise of data modeling is to make explicit the relationship between:

  • An outcome variable 𝑦𝑦, also called a dependent variable or response variable

  • An explanatory/predictor variable 𝑥𝑥, also called an independent variable or covariate.

Another way to state this is using mathematical terminology. We’ll model the outcome variable yyas a function of the explanatory/predictor variable 𝑥𝑥. When we say “function” here, we aren’t referring to functions in R like the ggplot() function, but rather as a mathematical function. However, why do we have two different labels, explanatory and predictor, for the variable 𝑥𝑥? That’s because even though the two terms ...