Comparing actual values with predicted results
Now, we will look at real values of weight of 15 women first and then will look at predicted values. Actual values of weight of 15 women are as follows, using the following command:
women$weight
When we execute the women$weight
command, this is the result that we obtain:
When we look at the predicted values, these are also read out in R:
How can we put these pieces of data together?
women$pred <- linearregressionmodel$fitted.values
This is a very simple merge. When we look inside the women variable again, ...
Get Advanced Analytics with R and Tableau now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.