cvar {complex} | R Documentation |
Correlation, Variance and Covariance (Matrices) for complex variables
Description
Functions cvar()
, ccov()
and ccor()
return respectively
complex variance, covariance and correlation based on the
provided complex vector/matrix x
. Function covar()
returns the covariance
matrix based on a complex vector/matrix.
Usage
cvar(x, method = c("direct", "conjugate"), df = NULL, ...)
ccov(x, y, method = c("direct", "conjugate"), df = NULL, ...)
ccor(x, y, method = c("direct", "conjugate", "pearson", "kendall",
"spearman"), ...)
ccov2cor(V)
covar(x, df = NULL)
Arguments
x |
vector or matrix of complex variables. If it is matrix then the
variable |
method |
method to use in the calculation of the measure. |
df |
Number of degrees of freedom to use in the calculation of the statistics. |
... |
parameters passed to |
y |
second vector to calculate covariance or correlations with. |
V |
complex (pseudo)covariance matrix. |
Details
Only the parametric correlation is supported by the function. If x
is matrix, then y
is ignored.
covar()
function returns a covariance matrix calculated for the provided complex
vector or matrix x
.
Value
A scalar or a matrix with resulting complex variables.
Author(s)
Ivan Svetunkov, ivan@svetunkov.ru
References
Svetunkov, S. & Svetunkov I. (2022) Complex Autoregressions. In Press.
See Also
Examples
# Generate random complex variables
x <- complex(real=rnorm(100,10,10), imaginary=rnorm(100,10,10))
y <- complex(real=rnorm(100,10,10), imaginary=rnorm(100,10,10))
# Create a matrix of complex variables
z <- cbind(x,y)
# Calculate measures
cvar(x)
cvar(z)
ccor(x,y)
ccor(z)