comp_ssr | R Documentation |
comp_ssr
computes the sum of squared residuals (SSR) from the
observed distances (diss
) and the given latent coordinates
(x
).
comp_ssr(x, diss)
x |
Real matrix containing the latent configuration. |
diss |
Observed dissimilarities (provided as a distance matrix). |
A length-one numeric vector providing the SSR for its arguments.
Sergio Venturini sergio.venturini@unicatt.it
bmds
for (one-way) Bayesian (metric) multidimensional
scaling.
n <- 10000 nr <- 200 nc <- floor(n/nr) x <- matrix(rnorm(1:n), nrow = nr, ncol = nc) obsdiss <- dist(x) ssr <- numeric(ncol(x)) for (i in 1:ncol(x)) { ssr[i] <- comp_ssr(x[, 1:i], obsdiss) } plot(ssr, xlab = "number of dimensions", ylab = "SSR", type = "b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.