[S] predict.gam()

John Thaden (jjthaden@life.uams.edu)
Thu, 07 May 1998 15:11:48 -0500


I know this has been discussed before, but I've still not caught on.

In most circumstances when I try to use predict.gam() with the newdata=
argument, I get errors having to do with lengths of variables, errors I
don't get when using predict.lm or predict.glm.

The latest occurence gives the message . . .

Error in lm.fit.qr(x, y, singular.ok = ..1): Number of observations in x
and y not equal

. . . but more often, the error looks something like . . .

Error in safe.predict.gam(object, newdata, type,..: Length of variable 1 is
1 != length of row names (40)

Sorry I don't have a pithy example handy -- my present frustration is with
a messy, half-written function -- but I'm pretty sure predict.gam is the
rotten apple since I can make the error messages go away by substituting
predict.lm.

I'm hoping someone else can succinctly state my problem and how I might
surmount it.

S-Plus 4.0 (rel. 3), Win95.

John Thaden, Ph.D.
Biochemist, UAMS

-----------------------------------------------------------------------
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