In the file "ch11-smoking-health-risk.R", on line 248, is given code for a multiple regression. Running the code on line 254 to add a variable for the predictions yields an error message saying the number of predictions is less than the number of cases in the file "share". Upon checking, the regression actually threw an error: "163 observations deleted due to missingness". When these cases were examined each had an NA in one or another column. Fixed by adding "na.action=na.exclude" to the original regression.
In the file "ch11-smoking-health-risk.R", on line 248, is given code for a multiple regression. Running the code on line 254 to add a variable for the predictions yields an error message saying the number of predictions is less than the number of cases in the file "share". Upon checking, the regression actually threw an error: "163 observations deleted due to missingness". When these cases were examined each had an NA in one or another column. Fixed by adding "na.action=na.exclude" to the original regression.