@harry wrote:
I am currently trying to plot my regression model in the given scatter plot which I have a plot by using ggplot.I want to know how I can plot my model in the given plot.
#### Is the fertility rate of a country was a good predictor of the percentage of the population under 15? ggplot(WHO, aes(x = FertilityRate, y = Under15)) + geom_point() #### log transformation: ggplot(WHO, aes(x = log(FertilityRate), y = Under15)) + geom_point() #### Simple linear regression model to predict the percentage of the population under 15, using the log of the fertility rate: mod = lm(Under15 ~ log(FertilityRate), data = WHO) summary(mod)
Posts: 2
Participants: 2