Dear R-experts, I have fitted a model with 2-way and 3-way interactions. I would like, for the 3-way interaction (year,age,by=education), to obtain 3D-plots. How could I do that ?
Many thanks for your response. Here is the reproducible example: ############# install.packages("ISLR") library(ISLR) install.packages("mgcv") library(mgcv) mod1<-gam(wage ~education+s(age,bs="ps")+year+te(age,year,bs="ps")+s(year,bs="ps",by=education,m=1)+te(year,age,by=education,bs=rep("ps",2)),data=Wage) plot(mod1) ############# ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.