bmds {bayMDS} | R Documentation |
run bmdsMCMC for various number of dimensions
Description
Provide object configuration and estimates of parameters, for number of dimensions from min_p to max_p
Usage
bmds(DIST,min_p=1, max_p=6,nwarm = 1000,niter = 5000,...)
Arguments
DIST |
symmetric data matrix of dissimilarity measures for pairs of objects |
min_p |
minimum number of dimensions for object configuration (default=1) |
max_p |
maximum number of dimensions for object configuration (default=6) |
nwarm |
number of iterations for burn-in period in MCMC (default=1000) |
niter |
number of MCMC iterations after burn-in period (default=5000) |
... |
arguments to be passed to methods. |
Details
Model
The basic model for Bayesian multidimensional scaling given in Oh and Raftery (2001) is
as follows.
Given the number of dimensions , we assume that an observed dissimilarity measure follows a truncated multivariate normal
distribution with mean equal to Euclidean distance, i.e.,
,
independently for
where
-
is the number of objects, i.e, numner of rows in DIST
-
is an observed dissimilarity measure between objects i and j
-
is the distance between objects i and j in a p-dimensional Euclidean space, i.e.,
-
denotes the values of the attributes possessed by object i, i.e., the coordinates of object i in a p-dimensional Euclidean space.
Priors
Prior distribution of
is given as a multivariate normal distribution with mean 0 and a diagonal covariance matrix
, i.e.,
, independently for
. Note that the zero mean and diagonal covariance matrix is assumed because Euclidean distance is invariant under translation and rotation of
.
Prior distribution of the error variance
is given as
, the inverse Gamma distribution with mode
.
Hyperpriors for the elements of
are given as
, independently for
.
We assume prior independence among
.
Measure of fit
A measure of fit, called STRESS, is defined as
,
where is the Euclidean distance between objects
i and j, computed from the estimated object configuration.
Note that the squared
is proportional to the sum of squared residuals,
.
Value
in bmds
object
- n
number of objects, i.e., number of rows in DIST
- min_p
minimum number of dimensions
- max_p
maximum number of dimensions
- niter
number of MCMC iterations
- nwarm
number of burn-in in MCMC
- *
the following lists contains objects from
bmdsMCMC
for number of dimensions from min_p to max_p- x_bmds
a list of object configurations
- minSSR.L
a list of minimum sum of squares of residuals between the observed dissimilarities and the estimated Euclidean distances between pairs of objects
- minSSR_id.L
a list of the indecies of the iteration corresponding to minimum SSR
- stress.L
a list of STRESS values
- e_sigma.L
a list of posterior mean of
- var_sigma.L
a list of posterior variance of
- SSR.L
a list of posterior samples of SSR
- lam.L
a list of posterior samples of elements of
- sigma.L
a list of posterior samples of
, the error variance
- del.L
a list of posterior samples of
s,Euclidean distances between pairs of objects)
- cmds.L
a list of object configuration from the classical multidimensional scaling of Togerson(1952)
- BMDSp
a list of outputs from bmdsMCMC founction for each number of dimensions
References
Oh, M-S., Raftery A.E. (2001). Bayesian Multidimensional Scaling and Choice of Dimension, Journal of the American Statistical Association, 96, 1031-1044.
Torgerson, W.S. (1952). Multidimensional Scaling: I. Theory and Methods, Psychometrika, 17, 401-419.
Examples
data(cityDIST)
out <- bmds(cityDIST)