https://github.com/cran/smacof
Revision 63f39c71802ff5c375cfb274d9d918f30d29b3d9 authored by Jan de Leeuw on 28 January 2011, 07:27:30 UTC, committed by cran-robot on 28 January 2011, 07:27:30 UTC
1 parent c91df3d
Tip revision: 63f39c71802ff5c375cfb274d9d918f30d29b3d9 authored by Jan de Leeuw on 28 January 2011, 07:27:30 UTC
version 1.1-0
version 1.1-0
Tip revision: 63f39c7
monregS.R
# secondary approach to ties
`monregS` <-
function(x, y, w = rep(1,length(x)), block = weighted.mean)
{
#x ... observed distance matrix
#y ... Guttman transformed distances
#w ... weights
wag <- tapply(w,x,sum)
yag <- tapply(y,x,mean)
xag <- tapply(x,x,mean)
o <- order(xag)
r <- order(o)
e <- pavasmacof(yag[o],wag[o])[r] #call pava
return(ifelse(outer(x,xag,"=="),1,0)%*%e)
}
Computing file changes ...