Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

circlin.cor

Circular-linear correlation


Description

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

Usage

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 mtsagris@uoc.gr and Giorgos Athineou <gioathineou@gmail.com>

References

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

See Also

Examples

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)

Directional

A Collection of R Functions for Directional Data Analysis

v4.9
GPL-2
Authors
Michail Tsagris, Giorgos Athineou, Anamul Sajib, Eli Amson, Micah J. Waldstein
Initial release
2021-03-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.