Closed ericward-noaa closed 10 months ago
The problem was that vessel was class character and not factor and so it only had one level in the new data after conversion internally. I think the simplest solution is just to issue a warning if the spatial_varying
formula includes class character. See https://github.com/pbs-assess/sdmTMB/commit/6e9d3876650e7a2c88eae60bbfda0efb553c1499
When using SVCs,
predict()
fails when all levels aren't included in the prediction dataframe. For example, this doesn't work:But when SVCs are removed, this all works great: