From the course: Machine Learning with Logistic Regression in Excel, R, and Power BI

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Solution: Calculating logistic regression

Solution: Calculating logistic regression

(upbeat music) - In our challenge, I'm going to use the same data in our script as I did for earlier videos. But I'm going to update it for the challenge. Let's use another column instead of the point scored. So let's see what the name of this column as that we want to use. We'll use the names function, which we'll call on the data frame variable. We now see a list of the column names appear in the console. Let's select rebounds, which just goes by the name rebounds. So I'm going to update the GLM function that is, is assigned to logit, by deleting the points team scored and updating it with rebounds. We can comment out the names code using the hash sign. We can then run this model. Summary will be updated because logit is updated. And we see the results and the coefficients for this model. We can then run the predictions on this model using rebounds instead of points scored. We don't have to update any part of the code in…

Contents