Hi Simon, Thanks for your reply.
m <- bam(Correct ~ cEnglishTotal + te(WSTResid, RavenResid) + s(Stimulus, bs="re") + s(Subject, bs="re"), data = dat, family = "binomial") # cEnglishTotal, WSTResid and RavenResid are continuous variables; Correct, Stimulus and Subject are factors. > vis.gam(m, view=c("WSTResid", "RavenResid")) Error in persp.default(m1, m2, z, col = col, zlim = c(min.z, max.z), xlab = view[1], : invalid 'z' limits In addition: Warning messages: 1: In max(z, na.rm = TRUE) : no non-missing arguments to max; returning -Inf 2: In min(fv$fit, na.rm = TRUE) : no non-missing arguments to min; returning Inf 3: In max(fv$fit, na.rm = TRUE) : no non-missing arguments to max; returning -Inf fitted(m) produces 1,000 numbers between 0 and 1, followed by: [ reached getOption("max.print") -- omitted 3042 entries ] > summary(fitted(m)) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0008869 0.0814900 0.3402000 0.4019000 0.7080000 0.9899000 > length(fitted(m)) [1] 13042 > print(m) Family: binomial Link function: logit Formula: Correct ~ cEnglishTotal + te(WSTResid, RavenResid) + s(Stimulus, bs = "re") + s(Subject, bs = "re") Estimated degrees of freedom: 3.0 84.2 111.2 total = 200.4 fREML score: 18325.93 Thanks for your time, Jan -- View this message in context: http://r.789695.n4.nabble.com/mgcv-1-7-19-vis-gam-invalid-z-limits-tp4638423p4638494.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.