cox.stuart {ANSM5}R Documentation

Perform Cox-Stuart test

Description

cox.stuart() performs the Cox-Stuart test and is used in chapters 4 and 10 of "Applied Nonparametric Statistical Methods" (5th edition)

Usage

cox.stuart(
  x,
  alternative = c("two.sided", "less", "greater"),
  cont.corr = TRUE,
  max.exact.cases = 1e+07,
  do.asymp = FALSE,
  do.exact = TRUE
)

Arguments

x

Numeric vector

alternative

Type of alternative hypothesis (defaults to two.sided)

cont.corr

Boolean indicating whether or not to use continuity correction (defaults to TRUE)

max.exact.cases

Maximum number of cases allowed for exact calculations (defaults to 10000000)

do.asymp

Boolean indicating whether or not to perform asymptotic calculations (defaults to FALSE)

do.exact

Boolean indicating whether or not to perform exact calculations (defaults to TRUE)

Value

An ANSMtest object with the results from applying the function

Examples

# Example 4.13 from "Applied Nonparametric Statistical Methods" (5th edition)
cox.stuart(ch4$precipitation)

# Exercise 10.5 from "Applied Nonparametric Statistical Methods" (5th edition)
cox.stuart(app1$McDelta[order(ch10$death.year)], alternative = "less")


[Package ANSM5 version 1.1.0 Index]