DF = read.csv( '../../Data/Swiss_birth_rates.csv', header=TRUE) rownames(DF) = DF$Province_Name DF$Province_Name = NULL ##print(head(DF)) par(mfrow=c(2, 1)) ## The raw data: ## x = DF$High_Education y = DF$Fertility_Rate plot(x, y, type='p', pch=19, xlab='Pct High Education', ylab='Fertility Rate') lines(loess.smooth(x, y, span=0.5), lwd=1, col='red') lines(loess.smooth(x, y, span=0.7), lwd=1, col='blue') lines(loess.smooth(x, y, span=1.0), lwd=1, col='green') grid() ## The log data: ## x = log(DF$High_Education) y = DF$Fertility_Rate plot(x, y, type='p', pch=19, xlab='log(Pct High Education)', ylab='Fertility Rate') lines(loess.smooth(x, y, span=0.5), lwd=1, col='red') lines(loess.smooth(x, y, span=0.7), lwd=1, col='blue') lines(loess.smooth(x, y, span=1.0), lwd=1, col='green') grid() par(mfrow=c(1, 1))