Intermediate Regression in R
Fit linear and logistic regression models in R with several explanatory variables, interactions and categorical inputs, and code the fitting algorithms.
Linear and logistic regression with several explanatory variables is the subject here. You fit models in R that mix numeric and categorical inputs, let the effect of one variable depend on another, meet Simpson’s Paradox, and write your own fitting algorithms to see how the estimates are found. Practice data include house prices in Taiwan, customer churn and eBay auctions.
What You Will Achieve
- Fit and interpret a model that combines one numeric and one categorical explanatory variable
- Judge which of two regression models fits better using the coefficient of determination and residual standard error
- Add an interaction between explanatory variables and calculate predictions with it, both by hand and in R
- Build a logistic model with several explanatory variables and check its predictions with a confusion matrix
Program Overview
Parallel Slopes and Interactions
Adds a categorical explanatory variable to a numeric one, then lets each category take its own slope through separate models and interaction terms.
- Fitting, visualizing and predicting with parallel slopes models
- Model performance measures and manual predictions
- One model per category versus one model with an interaction
- Simpson’s Paradox and modeling eBay auction types
Multiple Linear Regression
Works with two or more numeric explanatory variables, shows ways to visualize them, and opens up the sum of squares idea behind linear regression.
- Two numeric explanatory variables and 3D visualizations
- More than two explanatory variables and levels of interaction
- The sum of squares and a hand-written linear regression algorithm
Multiple Logistic Regression
Extends logistic regression to several explanatory variables and uses the logistic distribution to show how the model is estimated.
- Logistic models with two explanatory variables and their predictions
- The confusion matrix
- The logistic distribution, its cumulative distribution function and inverse
- Likelihood, log-likelihood and a logistic regression algorithm
Certificate Awarded (Paid)
Job Outlook
Regression with several explanatory variables is used wherever an outcome depends on more than one factor, such as pricing property, predicting which customers will leave, and analyzing auction results in R-based analytics work.
Good for: R users who already fit simple regressions and want models with several predictors, interaction effects and a clear look at how fitting works.
Keep in mind: It sticks to linear and logistic models, and the chapters on how they work ask you to code the fitting algorithms in R yourself.
Bottom line: A practical R follow-up to simple regression that adds categorical inputs, interactions and Simpson’s Paradox before showing how both model types are fitted.
Frequently Asked Questions
What is a parallel slopes model?
It is a linear regression with one numeric and one categorical explanatory variable. Each category gets its own intercept while all categories share one slope, so the fitted lines run parallel. The opening chapter fits, plots and predicts with this kind of model.
Which datasets are used in the exercises?
The exercises work with house prices from Taiwan and customer churn data, and the interactions chapter also models eBay auctions, including a separate model for each auction type.
Where does Simpson's Paradox come up?
It appears in the chapter on interactions. The paradox describes a trend that holds within groups but reverses or changes when the groups are combined, and the lessons show how adding explanatory variables can bring it to light.
Does the course show how regression models are actually fitted?
Yes. The linear regression chapter uses the sum of squares and has you write your own linear regression algorithm. The logistic chapter covers the logistic distribution, likelihood and log-likelihood before you code a logistic regression algorithm.
User Reviews
Write your review
You must be logged in to post a review.
Reviews can only be posted by registered learners. Log in or create a free account, then you will return here to post.


There are no reviews yet.