search for: producingf

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

Did you mean: producing
2006 Jan 02
2
update?
...dditivity test and naively wrote: nonadd <- function(formula){ f <- lm(formula) v <- f$fitted.values^2 g <- update(f, . ~ . + v) anova(f,g) } x <- rnorm(20) y <- rnorm(20) nonadd(y ~ x) Evidently, update is looking in the environment producingf f and doesn't find v, so I get: Error in eval(expr, envir, enclos) : Object "v" not found This may (or may not) be related to the discussion at: http://bugs.r-project.org/cgi-bin/R/Models?id=1861;user=guest but in any case I hope that someone can suggest how such difficulties can b...