oddsratio.2x2diff {ANSM5}R Documentation

Perform test for difference in odds ratios

Description

oddsratio.2x2diff() performs the test for difference in odds ratios and is used in chapter 13 of "Applied Nonparametric Statistical Methods" (5th edition)

Usage

oddsratio.2x2diff(
  x,
  y,
  z,
  alternative = c("two.sided", "less", "greater"),
  CI.width = 0.95,
  max.exact.perms = 1e+06,
  nsims.mc = 1e+05,
  seed = NULL,
  do.exact = TRUE,
  do.asymp = FALSE,
  do.mc = FALSE,
  do.CI = TRUE
)

Arguments

x

Binary factor of same length as y, z

y

Binary factor of same length as x, z

z

Binary factor of same length as x, y

alternative

Type of alternative hypothesis (defaults to two.sided)

CI.width

Confidence interval width (defaults to 0.95)

max.exact.perms

Maximum number of permutations allowed for exact calculations (defaults to 1000000)

nsims.mc

Number of Monte Carlo simulations to be performed (defaults to 100000)

seed

Random number seed to be used for Monte Carlo simulations (defaults to NULL)

do.exact

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

do.asymp

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

do.mc

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

do.CI

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

Value

An ANSMtest object with the results from applying the function

Examples

# Example 13.2 from "Applied Nonparametric Statistical Methods" (5th edition)
oddsratio.2x2diff(ch13$physical.activity, ch13$tv.viewing, ch13$gender,
  do.exact = FALSE, do.asymp = TRUE)
oddsratio.2x2diff(ch13$physical.activity, ch13$tv.viewing, ch13$gender,
  do.exact = FALSE, do.mc = TRUE, seed = 1, nsims = 10000)


[Package ANSM5 version 1.1.0 Index]