hadn't realised the answer would be in the source code!
anyway, this appears to work. The only difference is in the last section.
greg
--
library(mgcv)
#simulate some data
x1<-runif(500)
x2<-rnorm(500)
x3<-rpois(500,3)
d<-runif(500)
t<-runif(500,20,50)
linp<--6.5+x1+2*x2-x3+2*exp(-2*d)*sin(2*p
hello
I'm learning mgcv and would like to obtain numerical output corresponding
to plot.gam.
I can do so when seWithMean=FALSE (the default)
but only approximately when seWithMean=TRUE.
Can anyone show how to obtain the exact values?
Alternatively, can you clarify the explanation in the manual
Are you using mgcv:::gam? To get plot data suitable for making plots of smooth
effects, you probably need to use `predict.gam' to evaluate the smooth curves
(and standard errors) at a nice regular set of points for plotting. Also
don't forget that the residuals shown on plot.gam are the `partial
Hello all...
I'm attempting to write my own GAM plot function, so I can overlay it
on top of an already existing plot.
Problem is that after I do the gam, e.g. m<-gam(...), I cannot match
the graph that gam.plot outputs when I attempt to plot the values
from m$residuals, m$linear.predict
4 matches
Mail list logo