Essentially, @ greg-snow gave the right solution. Iβll clarify something.
In mboost you can use
plot(mod, which = "Day")
to effect only Day . Since we use regular expressions, you can do much more by using the which argument. In a model with linear and smooth effects, you can, for example, extract all the smooth effects to build:
airquality$Month <- as.factor(airquality$Month) mod <- mod <- gamboost(Ozone ~ bbs(Solar.R) + bbs(Wind) + bbs(Temp) + bols(Month) + bbs(Day), data=airquality[complete.cases(airquality),])
You can use any part of the name (see, for example, names(coef(mod)) ) to determine the effect that will be displayed. You can also use integer values ββto determine which effect to plot:
plot(mod, which = 1:2)
Please note that this can also be used for certain extraction ratios. For instance.
coef(mod, which = 1) coef(mod, which = "Solar") coef(mod, which = "bbs(Solar.R)")
all are the same. For more information on how to specify which , both in coef and plot , see our tutorial (Hofner et al. (2014)), Boosting based on the model in R - a practical tutorial using the mboost R-package. Computational Statistics, 29: 3-35. DOI 10.1007 / s00180-012-0382-5).
We confirm that this is not currently described in mboost , but that it is on our list of tasks (see github issue 14 ).
source share