mdsic | R Documentation |
mdsic
computes the information criterion for a set of Bayesian
multidimensional scaling (BMDS) solutions using the approach in
Oh & Raftery (2001).
mdsic(x_star, rmin_ssr, n, min_p = 1, max_p = 6)
x_star |
An array containing the latent configurations
estimated using |
rmin_ssr |
A numeric vector providing the ratios of SSR for the latent dimensions requested. |
n |
A length-one numeric vector providing the number of objects. |
min_p |
A length-one numeric vector providing the minimum value of the latent space dimension to use. |
max_p |
A length-one numeric vector providing the maximum value of the latent space dimension to use. |
A list with the following elements:
mdsic
A numeric vector with the values of MDSIC index.
bic
A numeric vector with the values of the BIC index.
Sergio Venturini sergio.venturini@unicatt.it
Oh, M.-S., Raftery, A. E. (2001), "Bayesian Multidimensional Scaling and Choice of Dimension", Journal of the American Statistical Association, 96, 1031-1044.
bmds
for Bayesian (metric) multidimensional scaling
and comp_ssr
for the computation of SSR.
## Not run: # Road distances (in km) between 21 cities in Europe data(eurodist, package = "datasets") min_p <- 1 max_p <- 10 burnin <- 200 nsim <- 1000 totiter <- burnin + nsim eurodist.mds <- cmdscale(eurodist, max_p) eurodist.bmds <- bmds(eurodist, min_p, max_p, burnin, nsim) plot((min_p:max_p), eurodist.bmds$mdsIC$mdsic, type = "b", main = "MDS Information Criterion", xlab = "p", ylab = "MDSIC") MDSICmin <- which.min(eurodist.bmds$mdsIC$mdsic) points((min_p:max_p)[MDSICmin], eurodist.bmds$mdsIC$mdsic[MDSICmin], col = "red", pch = 10, cex = 1.75, lwd = 1.5) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.