pamlglm.RdPower analysis for regression, ANOVA, and ANCOVA models using standardized coefficients, partial eta-squared, or eta-squared effect sizes.
pamlglm(
aim = "n",
mode = "peta",
es = 0.2,
df_effect = 1,
df_model = 1,
r2 = 0.2,
power = 0.9,
n = 20,
sig.level = 0.05,
alternative = "two.sided",
plot_contour = FALSE,
plot_escurve = FALSE,
plot_ncurve = FALSE,
plot_log = FALSE,
plot_palette = "viridis",
ncp_type = "model",
rx = NULL,
plot_x = "none",
plot_y = "none",
plot_custom_labels = FALSE,
plot_z = "none",
plot_x_from = 0,
plot_x_to = 0,
plot_z_lines = 0,
plot_z_value = list(),
plot_to_table = FALSE,
data = NULL
)The aim of the analysis: n (default) for sample size,
power to estimate power, or es to estimate the minimum
detectable effect size.
Effect size parameterization: "peta" for partial
eta-squared, "eta" for eta-squared, or "beta" for the
standardized regression coefficient formulation.
Expected effect size. It is interpreted as standardized
coefficient for mode="beta", partial eta-squared for
mode="peta", or eta-squared for mode="eta".
Effect degrees of freedom for the focal effect. It is used
for mode="peta" and mode="eta". For mode="beta", it
is fixed internally to 1.
Model degrees of freedom.
Expected model R-squared. It is used for mode="beta" and
mode="eta" and ignored for mode="peta".
Minimal desired power.
Sample size.
Type I error rate (significance cut-off or alpha).
Test direction: "two.sided" (default) or
"one.sided".
Logical; if TRUE, produce the power contour plot.
Logical; if TRUE, produce the power-by-effect-size
curve.
Logical; if TRUE, produce the power-by-sample-size
curve.
Logical; if TRUE, use a log scale where supported in
plots.
Color palette used for plots.
What type of non-centrality parameter (NCP) should be used.
The effect size is always transformed into a Cohen's f2, which is
multiplied by the estimated N based on the degrees of freedom such
that N=df+edf+1. model defines df as the model
degrees of freedom. This is the method used by G*Power software.
liberal uses the effect df. strict uses only the
error df (df=0).
a vector of strings naming the columns from data
containing the correlations among independent variables
Parameter shown on the X axis of the custom power plot.
Parameter shown on the Y axis of the custom power plot.
Logical; if TRUE, add value labels to the
custom plot.
Parameter used to split the custom power plot into multiple lines or conditions.
Lower bound of the X-axis parameter range for the custom power plot.
Upper bound of the X-axis parameter range for the custom power plot.
Number of reference lines or levels to use for
plot_z in the custom plot.
Explicit values of the plot_z parameter to use in
the custom plot.
Logical; if TRUE, output the plotted custom
power values as a table.
Optional data frame. It is only used when rx specifies
variables whose correlations should be read from data.
A results object containing:
results$intro | a html | ||||
results$extrainfo | a html | ||||
results$issues | a html | ||||
results$powertab | a table | ||||
results$effectsize | a table | ||||
results$powerbyes | a table | ||||
results$plotnotes | a html | ||||
results$powerContour | an image | ||||
results$powerEscurve | an image | ||||
results$powerNcurve | an image | ||||
results$powerCustom | an image | ||||
results$customnotes | a html | ||||
results$customtable | a table |
Tables can be converted to data frames with asDF or
as.data.frame. For example:
results$powertab$asDF
as.data.frame(results$powertab)