search for: predm2

Displaying 1 result from an estimated 1 matches for "predm2".

Did you mean: pred2
2007 Oct 24
3
scoping problem
I would like to write a function that computes Tukey's 1 df for nonadditivity. Here is a simplified version of the function I'd like to write: (m is an object created by lm): tukey.test <- function(m) { m1 <- update(m, ~.+I(predict(m)^2)) summary(m1)$coef } The t-test for the added variable is Tukey's test. This won't work: data(BOD) m1 <- lm(demand~Time,BOD)