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

Simon Wood s.wood at bath.ac.uk
Tue Jul 31 02:42:52 CEST 2012


Jan,

Could you send the exact gam call and exact vis.gam call that did this 
please? Also, if 'm' denotes your fitted model, what result does 
'fitted(m)' give? and what is the output from print(m)?

best,
Simon

On 07/30/2012 09:19 PM, janvanhove wrote:
> 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.
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list