View source: R/oddsratio.2x2diff.R
oddsratio.2x2diff | R Documentation |
oddsratio.2x2diff()
performs the test for difference in odds ratios and is used in chapter 13 of "Applied Nonparametric Statistical Methods" (5th edition)
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
)
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 |
CI.width |
Confidence interval width (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.exact |
Boolean indicating whether or not to perform exact calculations (defaults to |
do.asymp |
Boolean indicating whether or not to perform asymptotic calculations (defaults to |
do.mc |
Boolean indicating whether or not to perform Monte Carlo calculations (defaults to |
do.CI |
Boolean indicating whether or not to perform confidence interval calculations (defaults to |
An ANSMtest object with the results from applying the function
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.