data(simdat)
# Model with random effect and interactions:
m1 <- bam(Y ~ te(Time, Trial)+s(Time, Subject, bs='fs', m=1),
data=simdat)
# Plot summed effects:
vis.gam(m1, view=c("Time", "Trial"), plot.type='contour', color='topo')
# Partial effect of interaction:
pvisgam(m1, view=c("Time", "Trial"), select=1)
# Same:
plot(m1, select=1, scheme=2)
plot(m1, select=1)
# Alternatives:
pvisgam(m1, view=c("Trial", "Time"), select=1)
pvisgam(m1, view=c("Trial", "Time"), select=1, zlim=c(-20,20))
# see the vignette for examples:
vignette("plotfunctions", package="itsadug")
Run the code above in your browser using DataLab