Hello all,
Thank you for the previous assistance I received from this listserve!
My current question is: How can I create an appropriate matrix of
values from a GAM (actually a GAMM) to make a 3-D plot? This model is
fit as a tensor product spline of two predictors and I have used it to
make specific predictions by calling:
YoyRasPred6<-predict(YoyRas.Distribution.T.L.DT.gamm$gam,newdata=YoyRasSubset6,se.fit=T)
However, this type of command, I believe, produces only a vector of
values. I have plotted these values and know how to do so in 2-D.
However, I would like to create a 3-D plot, which I believe will require
an entire matrix of predictions (z values) based on all possible inputs
(x and y values). What is an efficient way to do this? It seems there
must be a better way than simply predicting vector after vector ... as I
am now, then piecing these together.
Thank you very much for any answers or assistance in general! Best wishes.
Sincerely,
Paul Simonin
______________________________________________
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.