Question: Add a new chunk of code that will include a multiple linear regression of the data within the Insurance2 dataset you created during the correlation
Add a new chunk of code that will include a multiple linear regression of the data within the Insurance2 dataset you created during the correlation analysis. Specifically, we want to see the impact of age, bmi and children on charges. For this code, follow the guidelines from Cookbook for R reading this week, specifically I want to see both the coefficients and summary of output (see below). 25.) The results show both the coefficient estimates and p-values. The coefficient will tell the impact of each independent variable (e.g., age) on the dependent variable (i.e., charges) in our model. The p-value will tell you if the variable is significant or not.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
