I somehow solved the problem - kind of. The data set on which I ran the GAM
model contains many more variables than are needed in the model, so I
created a new data set in R and reran the GAM model on the slimmed down data
set. Same problem: The GAM can be computed, but the tensor product cannot be
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, v
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
Hi everyone,
I can't figure out how to extract by-factor random effect adjustments from a
gam model (mgcv package).
Example (from ?gam.vcomp):
library(mgcv)
set.seed(3)
dat <- gamSim(1,n=400,dist="normal",scale=2)
a <- factor(sample(1:10,400,replace=TRUE))
b <- factor(sample(1:7,400,replace=TRUE)
4 matches
Mail list logo