Regression with categorical predictors The insurance.csv data base contains insurance information for 1338 people. The columns report
Fantastic news! We've Found the answer you've been seeking!
Question:
Regression with categorical predictors The insurance.csv data base contains insurance information for 1338 people. The columns report the age, sex, BMI, number of children, smoker status, and geographical region of each individual, as well as the insurance charges. Load the data set into a data frame. Recode the categorical variable smoker into a dummy variable, smoke. Use the ols function to perform a multiple regression with charges as the response variable and age, bmi, and smoke, in that order, as the predictor variables Create an analysis of variance table using the results of the multiple regression. If the number of children is used instead of BMI, the output is: sum_sq df F PR(>F) age 1.963476e+10 1.0 483.557436 1.062319e-91 children 4.592837e+08 1.0 11.311064 7.923099e-04 smoker_yes 1.237765e+11 1.0 3048.320439 0.000000e+00 Residual 5.416683e+10 1334.0 NaN NaN
Related Book For
Applied Regression Analysis and Other Multivariable Methods
ISBN: 978-1285051086
5th edition
Authors: David G. Kleinbaum, Lawrence L. Kupper, Azhar Nizam, Eli S. Rosenberg
Posted Date: