jonckheere.terpstra {ANSM5} | R Documentation |
Perform Jonckheere-Terpstra test
Description
jonckheere.terpstra()
performs the Jonckheere-Terpstra test and is used in chapters 7, 8 and 12 of "Applied Nonparametric Statistical Methods" (5th edition)
Usage
jonckheere.terpstra(
x,
g,
alternative = c("less", "greater"),
max.exact.cases = 15,
nsims.mc = 10000,
seed = NULL,
do.asymp = FALSE,
do.exact = TRUE,
do.mc = FALSE,
do.asymp.ties.adjust = TRUE
)
Arguments
x |
Numeric vector or factor of same length as g |
g |
Factor of same length as x |
alternative |
Type of alternative hypothesis (defaults to |
max.exact.cases |
Maximum number of cases 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 |
do.mc |
Boolean indicating whether or not to perform Monte Carlo calculations (defaults to |
do.asymp.ties.adjust |
Boolean indicating whether or not to use adjustment for ties in data (defaults to |
Value
An ANSMtest object with the results from applying the function
Examples
# Example 7.3 from "Applied Nonparametric Statistical Methods" (5th edition)
jonckheere.terpstra(ch7$dementia.age, ch7$features, alternative = "greater",
do.exact = FALSE, do.asymp = TRUE, do.asymp.ties.adjust = FALSE)
# Exercise 12.6 from "Applied Nonparametric Statistical Methods" (5th edition)
jonckheere.terpstra(ch12$ethnic.group, ch12$diabetes.status, do.exact = FALSE, do.asymp = TRUE)