Calculates the covariance matrix of the normally standardized variables obtained from the columns of x

covariance(
  x,
  data = x,
  cpf = NULL,
  mean = 0,
  sd = 1,
  step = NULL,
  prec = 10^-4,
  use = "pairwise.complete.obs",
  type = 3,
  extremes = TRUE,
  sample = NULL,
  origin_x = NULL,
  origin_data = origin_x
)

Arguments

x

variable

data

a sample of data on which a non-parametric pghjjrobability distribution is estimated

cpf

cumulative probability distribution. If NULL (default) is calculated as ecdf(data)

mean

mean (expected value) of the normalized random variable. Default is 0.

sd

standard deviation of the normalized random variable. Default is 1.

step

vector of values in which step discontinuities of the cumulative probability function occur. Default is NULL

prec

amplitude of the neighbourhood of the step discontinuities where cumulative probability function is treated as non continuous.

use

see cov

type

see quantile

extremes

logical variable. If TRUE (default) the probability or frequency is multiplied by $$\frac{N}{N+1}$$ where \(N\) is the length of data

sample

information about sample or probability distribution. Default is NULL

origin_x

date corresponding to the first row of x

origin_data

date corresponding to the first row of data

Value

a matrix with the normalized variable or its inverse

See also

normalizeGaussian_severalstations,normalizeGaussian

@note It applies normalizeGaussian_severalstations to x and data and then calculates the covariances among the column. See the R code for further details

Author

Emanuele Cordano, Emanuele Eccel