Dear all,
I apologies in advance if this is not the correct forum for this question. I'm happy to remove it if it is the case.
I fitted a GAM model in my university computer and saved it. Then, when I loaded it to my personal laptop, and ran gam.check(model)
, I keep getting this error:
gam.check(var_ini__ii_m2)
Error in 1:dk$nr[i] : NA/NaN argument
In addition: Warning message:
prediction from discrete bam models prior to 1.8-32 is deprecated, please refit
summary(model)
works fine, no issue. Running other functions from different packages such as draw(model)
from gratia
version 0.7.2 works fine as well.
Here is the model structure, just in case it matters:
beep(t_var_ini__aa_m2 <- system.time(var_ini__aa_m2 <- bam(val ~ x1x2 +
s(percent, bs= "cr", k=10) +
s(percent, bs= "cr", k=10, by=x1x2) +
s(percent, stim, bs="fs", m=1, k=10, by=x1x2)+
s(percent, stim, bs="fs", m=1, k=10)+
s(percent, word, bs="fs", m=1, k=10),
data = var_gam_aa_ini,
AR.start=var_gam_aa_ini$start.event,
method = "fREML",
discrete=T,
family = "scat",
nthread=8,
rho = var_ini__aa_m1_roh)))
save(var_ini__aa_m2, file = "var_ini__aa_m2.RData")
I using mgcv
version 1.8-39 in my personal machine, but not sure about the mgcv
version in my university machine. I'll check it out tomorrow, if relevant. Could anybody please advise on what is going on and how to get the output of gam.check()
?
Note that gam.check(model)
works fine in my university machine.
Thank you in advance,