View source: R/srh.simple.posthocs.R
srh.simple.posthocs | R Documentation |
For a formula y ~ A + B (+ C ...)
, enumerates all simple-effect
setups of the form COMPARE(target) | BY(other factors)
and runs
srh.simple.posthoc
with scope = "within"
for each.
Returns a named list of data frames (one per simple-effect configuration).
srh.simple.posthocs(formula, data)
formula |
A formula |
data |
A |
For each choice of the comparison factor target
from the RHS, all
non-empty combinations of the remaining factors are treated as conditioning
sets BY
. For each pair (target, BY)
we call
srh.simple.posthoc()
with compare = target
and
scope = "within"
. Effects where the conditioning subset has < 2 levels
of target
are skipped; messages are collected in attribute "skipped"
.
Labels use ASCII: "COMPARE(A) | BY(B x C)"
(plain " x "
).
A named list
of data.frame
s. Each element contains the
columns produced by srh.simple.posthoc
(e.g., Comparison
,
Z
, P.unadj
, P.adj
, m.tests
, adj.note
).
Attributes: "call"
and (optionally) "skipped"
with messages.
data(mimicry, package = "factorH")
# All simple-effect tables for a 2-factor design
tabs2 <- srh.simple.posthocs(liking ~ gender + condition, data = mimicry)
names(tabs2)
# e.g., tabs2[["COMPARE(gender) | BY(condition)"]]
# Three factors: all COMPARE(target) | BY(conditioning) combinations
tabs3 <- srh.simple.posthocs(liking ~ gender + condition + age_cat, data = mimicry)
names(tabs3)
attr(tabs3, "skipped") # any skipped combos with reasons
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.