Learn R Programming

uwo4419 (version 0.3.0)

makeStats: Measures of Association

Description

Calculate measures of association for a pair of factor variables.

Usage

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

Run this code
# NOT RUN {
data(alberta)
makeStats(alberta$k6group, alberta$d2, chisq=TRUE, taub=TRUE)
# }

Run the code above in your browser using DataLab