[R] mgcv 1.7-19, vis.gam(): "invalid 'z' limits'

janvanhove jan.vanhove at unifr.ch
Mon Jul 30 22:19:51 CEST 2012


Hi everyone,

I ran a binomial GAM consisting of a tensor product of two continuous
variables, a continuous parametric term and crossed random intercepts on a
data set with 13,042 rows. When trying to plot the tensor product with
vis.gam(), I get the following error message:

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
  
When I specify zlim in vis.gam, the 3D frame of the graph is plotted, but
not the tensor product surface itself, and vis.gam() returns the following
warning:

Warning message:
In max(z, na.rm = TRUE) : no non-missing arguments to max; returning -Inf

Unfortunately, I cannot replicate these errors with made-up data nor with a
random subset of the full data set. When I run the model WITHOUT the third
variable, everything works fine. Can anyone give me some pointers?

Thank you!
Jan

R version: 2.15.1 (32 bit Linux)
mgcv, version 1.7-19



--
View this message in context: http://r.789695.n4.nabble.com/mgcv-1-7-19-vis-gam-invalid-z-limits-tp4638423.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list