Closed fweber144 closed 11 months ago
With commit https://github.com/stan-dev/projpred/pull/484/commits/2e705b38eb417806edfc0445d2c2b89f467ab30c, the plots from above can be created as follows:
data("df_gaussian", package = "projpred")
dat <- data.frame(y = df_gaussian$y, df_gaussian$x)
rfit <- rstanarm::stan_glm(y ~ X1 + X2 + X3 + X4 + X5, data = dat, chains = 1,
iter = 500, seed = 8582, refresh = 0)
library(projpred)
vs <- varsel(rfit, method = "L1", nclusters_pred = 2, seed = 7203)
# Moving the submodel sizes above the (primary) x-axis:
plot(vs, text_angle = 90, size_position = "primary_x_top")
# Moving the submodel sizes into a secondary x-axis:
plot(vs, text_angle = 90, size_position = "secondary_x")
The tests are still running through.
@avehtari: Can this be merged?
Tested. Looks good!
Thanks. Merging now.
This adds argument
size_position
toplot.vsel()
. Illustrations:Tests are running through with this PR, but I haven't had the time to implement new tests for this argument
size_position
. I suggest we implement these in the future (will add that to my projpred to-do list).