circlin.cor: Circular-linear correlation

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/circlin.cor.R

Description

It calculates the squared correlation between a circular and one or more linear variables.

Usage

1
circlin.cor(theta, x, rads = FALSE)

Arguments

theta

The circular variable.

x

The linear variable or a matrix containing many linear variables.

rads

If the circualr variable is in rads, this should be TRUE and FALSE otherwise.

Details

The squared correlation between a circular and one or more linear variables is calculated.

Value

A matrix with as many rows as linear variables including:

R-squared

The value of the squared correlation.

p-value

The p-value of the zero correlation hypothesis testing.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <[email protected]> and Giorgos Athineou <[email protected]>

References

Mardia, K. V. and Jupp, P. E. (2000). Directional statistics. Chicester: John Wiley & Sons.

See Also

circ.cor1, circ.cor2, spml.reg

Examples

1
2
3
4
5
phi <- rvonmises(50, 2, 20, rads = TRUE)
x <- 2 * phi + rnorm(50)
y <- matrix(rnorm(50 * 5), ncol = 5)
circlin.cor(phi, x, rads = TRUE)
circlin.cor(phi, y, rads = TRUE)

Example output

     R-squared      p-value
[1,] 0.1726796 0.0002751809
      R-squared    p-value
[1,] 0.02175827 0.35958670
[2,] 0.01060580 0.60744650
[3,] 0.02425365 0.31977265
[4,] 0.01485813 0.49738872
[5,] 0.08703993 0.01655189

Directional documentation built on March 19, 2018, 5:05 p.m.