search for: pprfun

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

Did you mean: pfun
2001 Mar 20
3
Newbie question about by() -- update
...1. This seems to work (note that group takes values 1,2,3,4, or 5): my.newfun <- function(x) myfile <- lm(award ~ ilogemp + ilogage, x) test.by <- by(wintemp, as.factor(wintemp$group), my.newfun) 2. This does not work (leaving aside whether I am using ppr correctly or not!): > my.pprfun <- function(x) mypprfile <- ppr(award ~ ilogemp + ilogage, data = x, nterms = 5, + max.terms = 10, optlevel = 3) > test.by <- by(wintemp, as.factor(wintemp$group), my.pprfun) Error in model.frame.default(formula = award ~ ilogemp + ilogage, data = x) : Object "...