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 NULL)

v

Numeric vector of length equal to number of levels of y or NULL (defaults to NULL)

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.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 TRUE)

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)


[Package ANSM5 version 1.1.0 Index]