dt <- read.csv(“D:\t\drive-download-20190806T055124Z-001\wine.csv”) View(dt) attach(dt)
newdt <- as.data.frame(dt[,c(14,2)]) View(newdt)
summary(newdt)
qqnorm(Proline) plot(Alcohol,Proline)
cor(Alcohol,Proline)
model1 <- lm(Alcohol ~ Proline ,data=newdt) summary(model1) # Multiple R-squared: 0.4144 –Standard linear regression
model2 <- lm(Alcohol ~ log(Proline),data=newdt) summary(model2)
model3 <- lm(log(Alcohol) ~ log(Proline),data=newdt) summary(model3)
model4 <- lm(Alcohol ~ sqrt(proline),data =newdt) summary(model4)
#Multiple R-squared: 0.2041 —- Quadratic model
model5 <- lm(log(Alcohol) ~ log(Proline),data = newdt) summary(model5)
model6 <- lm(1/Alcohol ~ Proline,data = newdt) summary(model6)
#Multiple R-squared: 0.4 Reciprocal model