Hi,

Is there any way I can see how exactly the prediction equation is
constructed in the example below? I'd like to be able to replicate the
predictions from the fitted gam object as given by the predict.gam method in
the package "mgcv".

library(mgcv)
data(trees)
ct1 <- gam(Volume ~ s(Height) + s(Girth),
       family=Gamma(link=log), data=trees)
summary(ct1)
newdata <- cbind(Girth=mean(trees$Girth),
           Height=mean(trees$Height), Volume=mean(mean(trees$Volume)))
pred <- predict(ct1,as.data.frame(newdata),type="response")
pred

Thanks in advance,
Lars.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to