Open gavinsimpson opened 2 years ago
Tensor products with a random effect marginal(s) are supported but whether anything useful can be plotted remains to be seen.
There are also no checks yet on how many levels of the random effect there are or an argument to restrict the number of levels plotted.
Previously this was largely handled because {gratia} silently ignored 3+ dimensional smooths when plotting (which is where such random effect smooths would arise - if univariate random smooth users would use the
"fs"
basis instead). Now that we handle 3 and 4 d smooths, need to handle tensor product smooths that have a random effect smooth as a marginal.Think carefully about how to implement this; don't want to explode the number of evaluation points which could happen if the number of levels
n
of the random effect was large.If the dimension is 1, we have equivalent of
"fs"
— especially iffull = TRUE
andt2()
are used — Ifn
is say <= 16 and dimension is 3 (so we have random 2d surfaces) , we could evaluate the entire line/surface at a number of points for each level? But what about > 16? We could sample, randomly, 16 of the levels?For 4d smooths involving a random effect (so a random 3d smooth) I think we just have to not allow a plot. Which kinds makes finishing
data_slice()
more of a priority...For
smooth_estimates
we should just do what the user wants and evaluate everything.For
draw()
we should impose the above restrictions on what is plotted.Fix:
smooth_data()
needs to be aware of factors in the wrappersmooth_estimates()
draw.smooth_estimates()
draw.gam()