Open StefanoMezzini opened 3 months ago
Thanks for the report @StefanoMezzini!
The error comes from parametric_effects()
in this line:
data <- model.frame(object$pred.formula, data = data)
where I'm not applying the subset
from the original model fit.
Fixing this should involve the standard non-standard evaluation ideas of modifying the original call (stored in m$call
) to be a call to model.frame()
instead of bam()
, replacing the used formula with m$pred.formula
and the data
, subset
, drop.unused.levels
, and na.action
arguments (I think that would be sufficient here).
Hi Gavin, thank you for actively maintaining
{gratia}
!draw()
fails with an error when I I try to plot a model withparametric = TRUE
and I fit the model withbam(..., method = 'fREML', discrete = TRUE)
and I subset the data withinbam()
. A reprex is below.