Hi! S-plus users.
E-mail: s-news@wubios.wustl.edu
I have just received appropriate advice from
Dr. Rachel Fewster (Department of Statistics,
University of Auckland). I really appreciate it.
The program below works well.
-------------------- Program (C) --------------------
function()
{
xx <- seq(from = 1, by = 1, to = 10)
ex <- seq(from = 3, by = 0.3, length = 12)
yy <- sin(xx) + 2
data1 <- data.frame(x = xx, y = yy)
span1 <- 0.4
formula.name <- paste("y ~ lo(x, span =", span1, ")")
fit.gam <- gam(formula.name, data = data1, family = "poisson", x = T,
model = T)
data2 <- data.frame(x = ex)
ey <- predict.gam(fit.gam, data2)
ey
}
-------------------- End of Program (A) --------------------
Pleas note that "data1" is not on working directory.
This "formula.name" technique seems to have the wide range of
applications.
***** Kunio Takezawa, Ph.D. (takezawa@affrc.go.jp) *****
***** Research Information Section *****
**** Hokuriku National Agricultural Experiment Station, JAPAN ****
***** <http://www.inada.affrc.go.jp/~takezawa/patent-e.html> *****
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|