R/deflation.R

Defines functions deflation

Documented in deflation

#' @title Deflation
#' 
#' @description 
#' To deflate a matrix
#' 
#' @param X a numeric matrix
#' @param d a vector to deflate
#' @return Y a deflated matrix
#' @export
#' @keywords internal
deflation <- function(X,d){
  Y = X -   d %*% t(d) %*% X / sum(d * d)
  return(Y) 
   
}

Try the multigroup package in your browser

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

multigroup documentation built on March 26, 2020, 5:50 p.m.