Group-By Modeling in R Made Easy
There are several aspects of the R language that make it hard to learn, and repeating a model for groups in a data set used to be one of them. Here I briefly describe R's built-in approach, show a much easier one, then refer you to a new approach described in the superb book, R for Data Science, by Hadley Wickham and Garrett Grolemund. The gapminder data set contains a few measurements for countries around the world every five years from 1952 through 2007. Let's create a simple regression model to predict life expectancy from year. We'll start by looking at just New Zealand.
Dec-17-2017, 23:39:45 GMT