Dear S-plus users,
I am trying to use predict.gam() for imputation. I type the following:
fit.gam _ gam(WT~s(AGE)+SEX,data=y,na.action=na.omit)
predict.gam(fit.gam,newdata=y[is.na(y$WT),c("AGE","SEX")])
and I get an error message:
Warning in x * w.factor: Length of longer object is not a multiple of the
length of the shorter object
Error in names<-: Invalid length for names attribute: y = structure(..
Dumped
The same happens if I type
predict(fit.gam,newdata=y[is.na(y$WT),c("AGE","SEX")])
However, with lm predict() works fine:
fit.lm _ lm(WT~AGE+SEX,data=y,na.action=na.omit)
predict(fit.lm,newdata=y[is.na(y$WT),c("AGE","SEX")])
235 239 879 782
70.21978 82.96362 81.23095 67.47638
whereas predict.gam() does not:
predict.gam(fit.lm,newdata=y[is.na(y$WT),c("AGE","SEX")])
Warning in x * w.factor: Length of longer object is not a multiple of the
length of the shorter object
Error in names<-: Invalid length for names attribute: y = structure(..
Dumped
What is wrong?
I use S-plus 4.0 for Win release 2.
Thanks in advance
Vladimir
vpiotrov@janbe.jnj.com
-----------------------------------------------------------------------
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
|