View source: R/posthoc_planner.R
| Posthoc_planner | R Documentation |
One-shot planner for factor or cell comparisons, reporting m, FWER, suggested adjustments (Bonferroni/Sidak) and a post hoc recommendation (Holm, Tukey, Duncan, Gabriel, Scheffe, SNK, etc.) before testing.
Posthoc_planner(
model,
compare = NULL,
alpha = 0.05,
scope = c("factor", "cells"),
equal_var = TRUE,
unequal_n = FALSE,
independence = TRUE,
liberal_ok = FALSE,
orientation = c("rows", "cols"),
digits = 4,
percent_digits = 1,
observed_cells = TRUE
)
model |
aov or lm object (complete model). Data are reconstructed with model.frame(). |
compare |
Character with the name(s) of the factor(s) to compare: - One name: main effect. - Several names: if scope="cells" compares A:B:... cells; if scope="factor", reports each factor. If omitted, uses all factors when scope="factor", or the first factor when scope="cells". |
alpha |
Overall significance level (FWER target), default 0.05. |
scope |
"factor" compares each factor separately; "cells" compares interaction cells. |
equal_var |
Logical; assume homoscedasticity (default TRUE). |
unequal_n |
Logical; expect moderate imbalance of group sizes (default FALSE). |
independence |
Logical; if TRUE reports FWER "under independence" (default TRUE). |
liberal_ok |
Logical; allows more liberal suggestions (LSD/Duncan/SNK) (default FALSE). |
orientation |
"rows" (metrics as rows, default) or "cols". |
digits |
Decimal places for numeric output, default 4. |
percent_digits |
Decimal places for percentages, default 1. |
observed_cells |
Logical; in scope="cells", count only observed cells (drop NA). Default TRUE. |
data.frame. - orientation="rows": first column "Metric", rest columns are units (factor/cells). - orientation="cols": one row per unit, metrics as columns. Includes: g levels, m comparisons, global alpha, Bonferroni/Sidak alphas, FWERs (under independence), "Suggested p-value adjustment" and "Post hoc suggestion".
# example code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.