mu: Function to calculate Guttman's monotonicity coefficient (mu)...

Description Usage Arguments Value Examples

Description

The coefficient expresses the extent to which values on one variable increase in a particular direction along with the values on another variable without assuming that the increase is exactly according to a straight line.

Usage

1
mu(x, y)

Arguments

x

First vector

y

Second vector

Value

a number between -1 and +1

Examples

1
2
3
4
5
6
7
x1=rnorm(1000)
x2=x1^3+rnorm(1000)
#Compare three coefficients of association and plot association
cor(x1,x2)
cor(x1,x2,method="spearman")
mu(x1,x2)
plot(x1,x2)

CambridgeAssessmentResearch/POSAC documentation built on May 28, 2019, 12:16 p.m.