| get_viztest_levels | R Documentation |
get_viztest_levels() selects one or more representative stimulus levels
from a VizTest result object based on empirical difficulty and agreement.
Levels are chosen from rows with the maximum agreement probability
(psame) and can be returned individually (e.g., lowest, highest) or
collectively.
get_viztest_levels(
x,
method = c("easiest", "all", "lowest", "highest", "middle"),
...
)
x |
A VizTest result object containing a component |
method |
Character string specifying which level(s) to return.
One of |
... |
Reserved for future extensions; currently unused. |
The function first subsets x$tab to rows achieving the maximum value of
psame (ignoring missing values). From this subset:
"lowest" returns the smallest level.
"highest" returns the largest level.
"middle" returns the median level.
"easiest" returns the level with the maximum easy value.
"all" returns a named vector containing all four selections.
A numeric value when method is one of "lowest", "highest", "middle",
or "easiest". When method = "all", a named numeric vector with elements
lowest, highest, middle, and easiest.
VizTest
data(mtcars)
mtcars$cyl <- as.factor(mtcars$cyl)
mtcars$hp <- scale(mtcars$hp)
mtcars$wt <- scale(mtcars$wt)
mod <- lm(qsec ~ hp + wt + cyl, data=mtcars)
v <- viztest(mod)
v
get_viztest_levels(v, "easiest")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.