Description Usage Arguments Value References See Also Examples
View source: R/summaryMEclustnet.R
Summary of the output of the function MEclustnet which fits a mixture of experts latent position cluster model.
1 | summaryMEclustnet(fit, Y)
|
fit |
An object storing the output of the function |
Y |
The n x n binary adjacency matrix, with 0 down the diagonal, that was passed to |
A list with:
The value of the AICM criterion for the fitted model.
The value of the BICM criterion for the fitted model.
The value of the BICMCMC criterion for the fitted model.
The posterior mean vector of the regression coefficients for the link probabilities model.
The standard deviation of the posterior distribution of beta.
A matrix with G rows, detailing the posterior mean of the regression coefficients for the mixing proportions model.
The standard deviation of the posterior distribution of tau.
A G x d matrix containing the posterior mean of the latent locations' mean.
The standard deviation of the posterior distribution of mu.
A vector of length G containing the posterior mean of the latent locations' covariance.
The standard deviation of the posterior distribution of the latent locations' covariance.
A vector of length n detailing the posterior modal cluster membership for each node.
An n x d matrix containing the posterior mean latent location for each node.
Isobel Claire Gormley and Thomas Brendan Murphy. (2010) A Mixture of Experts Latent Position Cluster Model for Social Network Data. Statistical Methodology, 7 (3), pp.385-405.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #################################################################
# An example analysing a 2016 Twitter network of US politicians.
#################################################################
# Number of iterations etc. are set to low values for illustrative purposes.
# Longer run times are likely to be required to achieve sufficient mixing.
library(latentnet)
data(us.twitter.adjacency)
data(us.twitter.covariates)
link.vars = c(1)
mix.vars = c(1,5,7,8)
fit = MEclustnet(us.twitter.adjacency, us.twitter.covariates,
link.vars, mix.vars, G=4, d=2, itermax = 500, burnin = 50, uphill = 1, thin=10)
# Plot the trace plot of the mean of dimension 1 for each cluster.
matplot(t(fit$mustore[,1,]), type="l", xlab="Iteration", ylab="Parameter")
# Compute posterior summaries
summ = summaryMEclustnet(fit, us.twitter.adjacency)
plot(summ$zmean, col=summ$Kmode, xlab="Dimension 1", ylab="Dimension 2", pch=summ$Kmode,
main = "Posterior mean latent location for each node.")
# Plot the resulting latent space, with uncertainties
plotMEclustnet(fit, us.twitter.adjacency, link.vars, mix.vars)
# Examine which politicians are in which clusters...
clusters = list()
for(g in 1:fit$G)
{
clusters[[g]] = us.twitter.covariates[summ$Kmode==g,c("name", "party")]
}
clusters
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.