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

janvanhove jan.vanhove at unifr.ch
Tue Jul 31 08:54:02 CEST 2012


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.



More information about the R-help mailing list