| Title: | Cosine-Correlation Coefficient for Vector Variables |
|---|---|
| Description: | Computes the cosine-correlation coefficient for measuring the degree of linear dependence among variables in a multidimensional context. The package implements the generalized cosine-correlation theorem for p-1 variables, providing a quantitative assessment of interrelationships within experimental frameworks. This methodology extends classical correlation measures to higher-dimensional spaces using a dimensional exploration approach based on time scale calculus. |
| Authors: | Mehmet Niyazi Cankaya [aut, cre] |
| Maintainer: | Mehmet Niyazi Cankaya <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-05-23 15:14:51 UTC |
| Source: | https://github.com/cran/cosCorr |
Computes the cosine-correlation coefficient for a vector of p-1 variables, measuring the degree of linear dependence among variables in a multidimensional context.
cosCorr(x, na.rm = FALSE)cosCorr(x, na.rm = FALSE)
x |
A numeric vector of length p >= 2, where x[1] should be 0 (representing t_1). The remaining elements x[2], x[3], ..., x[p] represent the p-1 variables (t_2, t_3, ..., t_p). |
na.rm |
Logical. If TRUE, NA values are removed before computation. Default is FALSE. |
The cosine-correlation coefficient is defined as:
where and are the variables within the system.
The coefficient serves as a measure of the degree of linear dependence among
the p-1 variables, providing a quantitative assessment of their interrelationships
within a multidimensional context.
A numeric value representing the cosine-correlation coefficient
.
The coefficient ranges from 0 to 1, where higher values indicate greater
linear dependence among the variables.
# Example 1: Simple vector x <- c(0, 2, 3, 4) cosCorr(x) # Example 2: Vector with 5 variables x <- c(0, 1, 2, 3, 4, 5) cosCorr(x)# Example 1: Simple vector x <- c(0, 2, 3, 4) cosCorr(x) # Example 2: Vector with 5 variables x <- c(0, 1, 2, 3, 4, 5) cosCorr(x)