smacof (version 1.8-13)

gravity: Gravity dissimilarities

Description

Computes the dissimilarities using a gravity model based on co-occurences

Usage

gravity(X, lambda = 1)

Arguments

X
numeric matrix
lambda
tuning parameter

Value

gravdiss
Gravity dissimilarities
weightmat
Weight matrix for subsequent smacof computation
co.occ
Matrix with co-occurences

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 with lower bound 0). In addition, a weight matrix is created that sets cells with no co-occurences to 0, i.e. they are blanked out in a subsequent smacof fit (in the gravdiss output they are fixed to a value of 1000.

References

Mair, P., Rusch, T. & Hornik, K. (2014). The Grand Old Party - A party of values? SpringerPlus, 3(697), http://www.springerplus.com/content/3/1/697

See Also

smacofSym

Examples

Run this code
data(GOPdtm)
gravD <- gravity(GOPdtm, lambda = 2)
res <- smacofSym(gravD$gravdiss, weightmat = gravD$weightmat)
plot(res)

Run the code above in your browser using DataCamp Workspace