# NOT RUN {
# }
# NOT RUN {
data(durationsGe)
durationsGe$Frequency = log(durationsGe$Frequency + 1)
durationsGe$YearOfBirth = durationsGe$YearOfBirth - 1900
durationsGe.lm = lm(DurationOfPrefix ~ Frequency+SpeechRate, data = durationsGe)
summary(durationsGe.lm)
# ---- model criticism
plot(durationsGe.lm)
outliers = c(271, 392, 256, 413, 118, 256)
durationsGe.lm = lm(DurationOfPrefix ~ Frequency + SpeechRate,
data = durationsGe[-outliers, ])
summary(durationsGe.lm)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab