https://github.com/cran/smacof
Raw File
Tip revision: 33eaaa0f8a23e4860a9a45d24da33520c662e182 authored by Patrick Mair on 02 February 2016, 15:55:12 UTC
version 1.8-10
Tip revision: 33eaaa0
bmat.R
`bmat` <-
function(diss, wgths, d, eps = 1E-12)
{
  z <- ifelse(d < eps, 1, 0)
  b <- as.matrix((wgths*diss*(1-z))/(d+z))
  r <- rowSums(b) 
  return(diag(r)-b)
}

back to top