plot.poweRbal_data {poweRbal} | R Documentation |
This function generates a plot for an object of class poweRbal_data
.
Creates a bar plot if alt_model_params
and x$alt_model_params
= NULL and a line plot otherwise if this information is given.
## S3 method for class 'poweRbal_data'
plot(
x,
tss_names = NULL,
tss_colors = NULL,
sig_lvl = NULL,
legend_pos = "topright",
alt_model_names = NULL,
alt_model_params = NULL,
tss_ltys = NULL,
alt_model_family = NULL,
...
)
x |
An object of class
|
tss_names |
Vector of characters/expression of the TSS names (default
= NULL). If none are provided, |
tss_colors |
Vector of colors for the TSS (default = NULL). |
sig_lvl |
Level of significance (default=0.05, must be >0 and <1) depicted as a dashed horizontal line. Not depicted if set to NULL. |
legend_pos |
Character specifying where the legend is displayed (default = "topright"). No legend is displayed if set to NULL. |
alt_model_names |
Vector of characters/expression of the model names
(default = NULL). If none are provided, the column names of
|
alt_model_params |
Numeric vector containing the parameter
values of the representatives of the tree model (default = NULL). If none
are provided, |
tss_ltys |
Vector of line types for the TSS (default = NULL). |
alt_model_family |
Vector of characters/expressions of the name of the
tree model family and of the parameter (default = NULL), e.g.
|
... |
Additional arguments passed to the |
plot.poweRbal_data
No return value, as the primary purpose
of this function is the side effect (plotting).
# Plotting a 'poweRbal_data' object:
pc1 <- powerComp(tss = c("Sackin", "Colless", "B1I"),
alt_models = list(list("aldous",-1), "pda", "etm"),
n = 8L, N_null = 40L, N_alt = 20L)
plot(pc1)
# Plotting a power comparison with a tree model family
pc2 <- powerComp(tss = c("Sackin", "Colless", "B1I"),
alt_models = list(list("aldous", -1.5),
list("aldous", -1),list("aldous", -0.5),
list("aldous", 0),list("aldous", 0.5)),
n=20L, N_null = 20L, N_alt = 10L, distribs = "sampled")
# Create a bar plot or ...
plot(pc2)
# ... a line plot by specifying 'alt_model_params'.
plot(pc2, alt_model_params = c(-1.5,-1,-0.5,0,0.5),
tss_names = getTSSnames(c("Sackin", "Colless", "B1I")),
tss_colors = getTSScolors(c("Sackin", "Colless", "B1I")),
alt_model_family = c("Aldous\'", expression(beta)),
ylim = c(0,1))