R/updateR.R

Defines functions updateR

updateR <- function(S,L,Sigmahat,Gamma,rho){
  C <-  S-L-(Sigmahat+Gamma)/rho
  a <- eigen(C)
  D <- diag(a$values)
  U <- a$vectors
  R <- 1/2*U%*%(D+sqrt(D*D+4/rho*diag(rep(1,nrow(Sigmahat)))))%*%t(U)
  return(R)
}

Try the latentgraph package in your browser

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

latentgraph documentation built on Dec. 15, 2020, 5:23 p.m.