makeStats: Measures of Association

Description Usage Arguments Value Examples

View source: R/4419_functions.r

Description

Calculate measures of association for a pair of factor variables.

Usage

1
2
makeStats(x, y, chisq = FALSE, phi = FALSE, cramersV = FALSE, lambda = FALSE,
  gamma = FALSE, d = FALSE, taub = FALSE, rho = FALSE, n = 1000)

Arguments

x

Either a matrix providing a cross-tabulation of two variables (if y is NULL) or one variable that will be cross-tabulated with y.

y

Either NULL if x is a matrix or a variable that will be cross-tabulated with x.

chisq

Logical indicating whether Chi-squared should be calculated.

phi

Logical indicating whether phi should be calculated.

cramersV

Logical indicating whether Cramer's Vshould be calculated.

lambda

Logical indicating whether Lambda should be calculated.

gamma

Logical indicating whether Gamma should be calculated.

d

Logical indicating whether Somer's D should be calculated.

taub

Logical indicating whether Kendall's Tau b should be calculated.

rho

Logical indicating whether Spearman's Rho should be calculated.

n

Number of simulated values used to calculate the p-value

Value

A matrix of statistics and simulated p-values.

Examples

1
2
data(alberta)
makeStats(alberta$k6group, alberta$d2, chisq=TRUE, taub=TRUE)

davidaarmstrong/uwo4419 documentation built on Sept. 22, 2020, 3:32 p.m.