gavinsimpson / gratia

ggplot-based graphics and useful functions for GAMs fitted using the mgcv package
https://gavinsimpson.github.io/gratia/
Other
206 stars 28 forks source link

draw.gam doesn't fail gracefully is parametric = TRUE but there are no parametric terms #200

Closed gavinsimpson closed 1 year ago

gavinsimpson commented 1 year ago
df <- data_sim("eg2", n = 2000, dist = "normal", scale = 0.5, seed = 42)

# fit the GAM (note: for execution time reasons, k is set articifially low)
m <- gam(y ~ te(x, z, k = c(5, 5)), data = df, method = "REML")

draw(m, parametric = TRUE)