December 2017
Beginner to intermediate
470 pages
12h 29m
English
A basic way of checking the linearity assumption is to make a scatter plot with the dependent variable in the y axis and an independent variable in the x axis. If the relation appears to be linear, the assumption is validated. In any interesting problem it's extremely hard to find a scatter plot that shows a very clear linear relation, and if it does happen we should be a little suspicious and careful with the data. To avoid reinventing the wheel, we will use the plot_scatterlot() function we created in Chapter 2, Understanding Votes with Descriptive Statistics:
plot_scatterplot( data = data, var_x = "Age_18to44", var_y = "Proportion", var_color = FALSE, regression = TRUE ) plot_scatterplot( data = data, ...