This function plots statistical power curves (for main, moderation, and/or mediation effects) under a fixed budget across optimal design parameters.
# S3 method for power
plot(
expr = NULL,
nlim = c(2, 300),
plim = c(0.01, 0.99),
Jlim = c(3, 300),
n = NULL,
p = NULL,
J = NULL,
powerlim = c(0, 1),
plot.title = NULL,
m = NULL,
d = NULL,
gamma = NULL,
omega = NULL,
power = 0.8,
q = NULL,
by = c("n", "p", "J"),
legend = TRUE,
nlab = "Level-One Sample Size (n)",
plab = "Proportion (p)",
Jlab = "Level-Two Sample Size (J)",
powerlab = "Statistical Power"
)Returned objects from an od function (e.g., od.2m, od.2m.mod).
The limits of the level-1 sample size (n) for calculating and plotting power curves.
The limits of the proportion to the treated (p) for calculating and plotting power curves.
The limits of the level-2 sample size (J) for calculating and plotting power curves.
The sample size at level 1 per level-2 unit.
The proportion of units in the treatment condition.
Level-2 sample size.
The power limit for plotting power curves.
The title of the plot (e.g., plot.title = "Power Curves"). The default is NULL.
Total budget, default is the total costs of sampling 60 sites.
Standardized effect size for a main/average effect.
Standardized effect size for a moderation effect.
The treatment-by-site variance.
Statistical power.
The number of covariates.
Dimensions to plot power curves by the optimal design parameters. The default value is by all optimal design parameters for a type of design. For example, default values are by = "p" for single-level designs, by = c("n", "p") for two-level designs, and by = c("n", "p", "J") for three-level designs.
Logical; present plot legend if TRUE. The default is TRUE.
Label for the x-axis when the plot is by the optimal design parameter "n".
Label for the x-axis when the plot is by the optimal design parameter "p".
Label for the x-axis when the plot is by the optimal design parameter "J".
The label for the statistical power.