Learn R Programming

bayMDS (version 2.0)

bmdsMCMC: MCMC for Bayesian multidimensional scaling

Description

run MCMC algorithm given in Oh and Raftery (2001) and return posterior samples of parameters as well as object configuration and other parameter estimates, for a given number of dimensions p

Usage

bmdsMCMC(DIST,p,nwarm = 1000,niter = 5000)

Value

A list of MCMC results

x_bmds

n by p matrix of object configuration that minimizes the sum of squares of residuals(SSR), where n is the number of objects, i.e., n=nrow(DIST)

cmds

n by p matrix of object configuration from the classical multidimensional scaling of Togerson(1952)

minSSR

minimum of sum of squares of residuals between the observed dissimilarities and the estimated Euclidean distances for pairs of objects

minSSR_id

index of the iteration corresponding to minimum SSR

stress

STRESS computed from minSSR

e_sigma

posterior mean of \(\sigma^2\)

var_sigma

posterior variance of \(\sigma^2\)

SSR.L

niter dimensional vector of posterior samples of SSR

lam.L

niter by p matrix of posterior samples of elements of \(\Lambda\)

sigma.L

niter dimensional vector of posterior samples of \(\sigma^2\)

del.L

niter by \(n(n-1)/2\) matrix of posterior samples of \(\delta\), p-dimensional Euclidean distances between pairs of objects

Arguments

DIST

symmetric matrix of dissimilarity measures between objects

p

number of dimensions of object configuration

nwarm

number of iterations for burn-in period in MCMC (default=1000)

niter

number of MCMC iterations after burn-in period (default=5000)

References

Oh, M-S., Raftery A.E. (2001). Bayesian Multidimensional Scaling and Choice of Dimension, Journal of the American Statistical Association, 96, 1031-1044.

Examples

Run this code
# \donttest{
data(cityDIST)
result=bmdsMCMC(cityDIST,p=3)
# }

Run the code above in your browser using DataLab