str(bath)
dotplot(ordered(time) ~ er, bath, groups = temp, type = c("p","a"),
xlab = expression("Electrical resistance (ohm/" * m^2 * ")"),
ylab = "Time in bath (coded)",
auto.key = list(columns = 2, lines = TRUE))
summary(fm1 <- lm(er ~ time * temp, bath))
summary(fm2 <- lm(er ~ time + temp, bath))
summary(fm3 <- lm(er ~ temp, bath))
Run the code above in your browser using DataLab