Question -
Package: car (You may have to install this package)
DataFrame: Leinhardt
This dataset lists the data from about 105 countries on their per capita income, infant mortality rate, the region, and whether the country has oil reserves or not.
a. With income at the x-axis, and infant mortality rate at the y-axis, construct a scatterplot. Now construct a scatterplot with the log of the values, i.e. log(income) and log(infant). Which plot suggests a linear relationship? (Hint: Omit missing values to plot)
b. For the plot that suggests a linear relationship, using the set of variables for that plot, fit a regression line. What is the regression equation?
What to Submit:
- Answers to (a) and (b)
- Screenshot of the code.
- .R file SEPARATELY in the section listed.