Visreg package : Legend to large and 3 ways-interactions possible ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Visreg package : Legend to large and 3 ways-interactions possible ?

R help mailing list-2
Dear R-experts,

The reproducible example is below.

I am trying to use the visreg package for 2 ways-interactions and for 3 ways-interactions.
For 2 ways-interactions, everything goes fine except that the legend on the top (2.HS Grad ; 3. Some College ; 4. College Grad) is not entire/complete, because written too large, I would like to make it smaller to be able to read the entire legend. Is it possible ?

My 2nd question: I am wondering if it is possible to plot 3 ways-interactions using visreg : "year" ; "age"; "education" ?

Many thanks for your time

#############

install.packages("ISLR")

library(ISLR)

install.packages("visreg")

library(visreg)

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)

visreg(mod1, "year", by="education",partial=FALSE,overlay=TRUE)

 #############
 

______________________________________________
[hidden email] 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.