| eta_vs_catcov | R Documentation |
Eta categorical covariate plots (typical)
eta_vs_catcov(
xpdb,
mapping = NULL,
etavar = NULL,
covvar = NULL,
drop_fixed = TRUE,
orientation = "x",
show_n = check_xpdb_x(xpdb, .warn = FALSE),
type = "bol",
list = TRUE,
title = "Eta versus categorical covariates | @run",
subtitle = "Based on @nind individuals, Eta shrink: @etashk",
caption = "@dir",
tag = NULL,
facets,
.problem,
quiet,
...
)
xpdb |
< |
mapping |
|
etavar |
|
covvar |
|
drop_fixed |
As in |
orientation |
Passed to |
show_n |
Add "N=" to plot |
type |
Passed to |
list |
< |
title |
Plot title |
subtitle |
Plot subtitle |
caption |
Plot caption |
tag |
Plot tag |
facets |
Additional facets |
.problem |
Problem number |
quiet |
Silence output |
... |
Any additional aesthetics. |
The ability to show number per covariate level is inspired
by the package pmplots, but is implements here within
the xpose ecosystem for consistency.
The desired plot, or (when etavar resolves to more than one
eta and list = TRUE) a plain list of one plot per eta.
eta_vs_catcov(xpdb_x)
# Labels and units are also supported
xpdb_x %>%
xpose::set_var_labels(AGE="Age", MED1 = "Digoxin") %>%
xpose::set_var_units(AGE="yrs") %>%
set_var_levels(SEX=lvl_sex(), MED1 = lvl_bin()) %>%
eta_vs_catcov()
# Combine all etas onto one shared, faceted plot instead of a list
eta_vs_catcov(xpdb_x, list = FALSE)
# Restrict to specific covariates with covvar, just like etavar
eta_vs_catcov(xpdb_x, covvar = SEX)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.