\begin{Schunk}
\begin{Sinput}
 logy <- log(y)
 mod3 <- lm(logy ~ x)
 summary(mod3)
 xsorted <- seq(range(x)[1], range(x)[2], length.out=20)
 predsq <- predict(mod3, newdata=data.frame(x=xsorted))
 par(mfrow=c(1,2))
 plot(x, logy, main="Scatter for logy and x")
 lines(xsorted, predsq)
 plot(x, y, main="y predicted from log(y)~x")
 lines(xsorted, exp(predsq))
 par(mfrow=c(1,1))
\end{Sinput}
\end{Schunk}
