View source: R/logoddsratio.2x2.R
logoddsratio.2x2 | R Documentation |
logoddsratio.2x2()
performs the Log odds ratio test and is used in chapter 13 of "Applied Nonparametric Statistical Methods" (5th edition)
logoddsratio.2x2(
x,
y,
max.exact.cases = 10,
nsims.mc = 1e+05,
seed = NULL,
do.exact = TRUE,
do.asymp = FALSE,
do.mc = FALSE
)
x |
Binary factor of same length as y |
y |
Binary factor of same length as x |
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.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 |
An ANSMtest object with the results from applying the function
# Exercise 13.2 from "Applied Nonparametric Statistical Methods" (5th edition)
#logoddsratio.2x2(ch13$physical.activity[ch13$gender == "Boy"],
# ch13$tv.viewing[ch13$gender == "Boy"], do.exact = FALSE, do.asymp = TRUE)
#logoddsratio.2x2(ch13$physical.activity[ch13$gender == "Girl"],
# ch13$tv.viewing[ch13$gender == "Girl"], do.exact = FALSE, do.asymp = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.