\begin{Schunk}
\begin{Sinput}
 plot( prestige ~ education, data=Prestige, col=Prestige$type)
 m7 <- lm(prestige ~ type / education, data=Prestige)
 nd2 <- expand.grid(education=range(Prestige$education), type = levels(Prestige$type))
 nd2$pred <- predict(m7, newdata=nd2)
 for(i in 1:3){
  with(nd2[nd2$type %in% levels(nd2$type)[i], ], 
     lines(education, pred, col=i, lty=i, lwd=2))
  }
 legend("bottomright", legend=levels(Prestige$type), lty=1:3, col=1:3, lwd=2)
 outreg(m7, tight=F)
\end{Sinput}
\end{Schunk}
