friedman {ANSM5} | R Documentation |
Perform Friedman test
Description
friedman()
performs the Friedman test and is used in chapter 7 of "Applied Nonparametric Statistical Methods" (5th edition)
Usage
friedman(
y,
groups,
blocks,
use.Iman.Davenport = FALSE,
max.exact.perms = 1e+05,
nsims.mc = 1e+05,
seed = NULL,
do.asymp = FALSE,
do.exact = TRUE
)
Arguments
y |
Numeric vector of same length as groups, blocks |
groups |
Factor of same length as y, blocks with levels such that length(y) == nlevels(groups) * nlevels(blocks) |
blocks |
Factor of same length as y, groups with levels such that length(y) == nlevels(groups) * nlevels(blocks) |
use.Iman.Davenport |
Boolean indicating whether or not to use Iman and Davenport approximation (defaults to |
max.exact.perms |
Maximum number of permutations allowed for exact calculations (defaults to |
nsims.mc |
Number of Monte Carlo simulations to be performed (defaults to |
seed |
Random number seed to be used for Monte Carlo simulations (defaults to |
do.asymp |
Boolean indicating whether or not to perform asymptotic calculations (defaults to |
do.exact |
Boolean indicating whether or not to perform exact calculations (defaults to |
Value
An ANSMtest object with the results from applying the function
Examples
# Example 7.6 from "Applied Nonparametric Statistical Methods" (5th edition)
friedman(ch7$pulse, ch7$time.period, ch7$student, do.exact = FALSE, do.asymp = TRUE)
# Exercise 7.12 from "Applied Nonparametric Statistical Methods" (5th edition)
friedman(ch7$names.recalled, ch7$group, ch7$medical.student, use.Iman.Davenport = TRUE,
do.exact = FALSE, do.asymp = TRUE)