cs <- c(23, 19, 30, 22, 23, 29, 35, 36, 33, 25)
ts <- c(430, 430, 333, 410, 390, 377, 325, 310, 328, 375)
mod <- lm(ts ~ cs)
# obtain the SER using `summary()` and save the value to `SER`
# compute the SSR and save it to `SSR`
# do the comparison
# obtain the SER using `summary()` and save the value to `SER`
SER <- summary(mod)$sigma
# compute the SSR and save it to `SSR`
SSR <- SER^2*(length(ts)-2)
# do the comparison
SSR == sum(mod$residuals^2)
test_object("SER")
test_object("SSR")
test_or({
test_student_typed("SSR == sum(mod$residuals^2)")
},{
test_student_typed("sum(mod$residuals^2) == SSR")
}
)
success_msg("Nice!")