linear.by.linear {ANSM5} | R Documentation |
Perform Linear by linear association test
Description
linear.by.linear()
performs the Linear by linear association test and is used in chapter 13 of "Applied Nonparametric Statistical Methods" (5th edition)
Usage
linear.by.linear(
x,
y,
u = NULL,
v = NULL,
nsims.mc = 1e+05,
seed = NULL,
do.asymp = FALSE,
do.mc = TRUE
)
Arguments
x |
Factor of same length as y |
y |
Factor of same length as x |
u |
Numeric vector of length equal to number of levels of x or NULL (defaults to |
v |
Numeric vector of length equal to number of levels of y or NULL (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.mc |
Boolean indicating whether or not to perform Monte Carlo calculations (defaults to |
Value
An ANSMtest object with the results from applying the function
Examples
# Example 13.8 from "Applied Nonparametric Statistical Methods" (5th edition)
linear.by.linear(ch13$dose, ch13$dose.side.effect, do.mc = FALSE, do.asymp = TRUE)
# Exercise 13.4 from "Applied Nonparametric Statistical Methods" (5th edition)
linear.by.linear(ch13$SBP, ch13$cholesterol, seed = 1)