Computes the dissimilarities using a gravity model based on co-occurrences.
Usage
gravity(X, lambda = 1)
Value
gravdiss
Gravity dissimilarities
weightmat
Weight matrix for subsequent smacof computation
co.occ
Matrix with co-occurences
Arguments
X
numeric matrix
lambda
tuning parameter
Author
Patrick Mair
Details
The first step in this function is to compute the co-occurences. Based on the
binarized data matrix \(Y\) we compute \(Y'Y\) which leads to the co-occurence matrix.
We then use the gravity model to compute the gravity dissimilarities.
In order to give more (or less) structure to the MDS solution, the tuning parameter (which
defines a power transformation) can be increased (or decreased). In addition,
a weight matrix is created that sets cells with no co-occurences to 0. The corresponding weight matrix for blanking out these cells is established automatically in mds().