R/cholcors.R

Defines functions cholcors

Documented in cholcors

#' cholcors
#'
#' @param X A matrix of data.
#' @param use the missing data type to use for the correlation. Default is R's default "everything".
#'
#' @return This function returns the cholesky decomposition of the correlation matrix of the data
#' @import stats
#' @export
#'
#' @examples X<-stats::rnorm(100)
#' Y<-stats::rnorm(100)+X
#' Z<-cbind(X,Y)
#' cholcors(Z)
cholcors<-function(X, use="everything"){#Returns the cholesky decomposition for the diagonalization process
  return(chol(stats::cor(X,use=use)))
}

Try the Omisc package in your browser

Any scripts or data that you put into this service are public.

Omisc documentation built on Aug. 9, 2022, 5:09 p.m.