Multiple and logistic regression

Report 3 Downloads 451 Views
DataCamp

Multiple and Logistic Regression

MULTIPLE AND LOGISTIC REGRESSION

Multiple and logistic regression Ben Baumer Instructor

DataCamp

Fuel efficiency by engine size ggplot(data = mpg_manuals, aes(x = displ, y = hwy)) + geom_point()

Multiple and Logistic Regression

DataCamp

Fuel efficiency over time ggplot(data = mpg_manuals, aes(x = factor(year), y = hwy)) + geom_boxplot()

Multiple and Logistic Regression

DataCamp

A parallel slopes model

Multiple and Logistic Regression

DataCamp

Multiple and Logistic Regression

Adding a new variable Consider: hwy = β0 + β1 ⋅ displ + β2 ⋅ year + ϵ

DataCamp

Adding a new variable in R lm(hwy ~ displ + factor(year), data = mpg)

Multiple and Logistic Regression

DataCamp

Multiple and Logistic Regression

MULTIPLE AND LOGISTIC REGRESSION

Let's practice!

DataCamp

Multiple and Logistic Regression

MULTIPLE AND LOGISTIC REGRESSION

Visualizing parallel slopes models Ben Baumer Instructor

DataCamp

Three variables, one plot data_space

Multiple and Logistic Regression

DataCamp

Multiple and Logistic Regression

Setting up the model Define 1 newer = { 0

if year = 2008, if year = 1999

Our model is: ^ = β^0 + β^1 ⋅ displ + β^2 ⋅ newer hwy

DataCamp

Multiple and Logistic Regression

Two vintages of cars mod