noamross / gams-in-r-course

Generalized Additive Models in R: A Free Interactive Course
https://noamross.github.io/gams-in-r-course
Other
243 stars 69 forks source link

Chapter 3, section 8 #25

Open cardiomoon opened 4 years ago

cardiomoon commented 4 years ago

When try to plot factor-smooths, vis.gam() function results in an error.

model4c <- gam(hw.mpg ~ s(weight, fuel, bs = "fs"),data = mpg, method = "REML")
vis.gam(model4c, theta=125)

Error in persp.default(m1, m2, z, col = col, zlim = c(min.z, max.z), xlab = view[1], : increasing 'x' and 'y' values expected