Package manet. August 23, 2018

Similar documents
Package manet. September 19, 2017

Package datasets.load

Package bisect. April 16, 2018

Package gtrendsr. October 19, 2017

Package RNAseqNet. May 16, 2017

Package gtrendsr. August 4, 2018

Package RCA. R topics documented: February 29, 2016

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package weco. May 4, 2018

Package messaging. May 27, 2018

Package CuCubes. December 9, 2016

Package geogrid. August 19, 2018

Package kirby21.base

Package mfa. R topics documented: July 11, 2018

Package strat. November 23, 2016

Package longclust. March 18, 2018

Package pairsd3. R topics documented: August 29, Title D3 Scatterplot Matrices Version 0.1.0

Package textrank. December 18, 2017

Package fastdummies. January 8, 2018

Package spark. July 21, 2017

Package sigmanet. April 23, 2018

Package SEMrushR. November 3, 2018

Package calpassapi. August 25, 2018

Package ASICS. January 23, 2018

Package SSLASSO. August 28, 2018

Package Numero. November 24, 2018

Package sparsereg. R topics documented: March 10, Type Package

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package sfc. August 29, 2016

Package PTE. October 10, 2017

Package intccr. September 12, 2017

Package sigqc. June 13, 2018

Package TVsMiss. April 5, 2018

Package clustering.sc.dp

Package projector. February 27, 2018

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package lvm4net. R topics documented: August 29, Title Latent Variable Models for Networks

Package Bergm. R topics documented: September 25, Type Package

Package pomdp. January 3, 2019

Package ibm. August 29, 2016

Package sspse. August 26, 2018

Package mdftracks. February 6, 2017

Package birtr. October 4, 2017

Package repec. August 31, 2018

Package OLScurve. August 29, 2016

Package svalues. July 15, 2018

Package ECctmc. May 1, 2018

Package QCAtools. January 3, 2017

Package balance. October 12, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package qualmap. R topics documented: September 12, Type Package

Package ITNr. October 11, 2018

Package queuecomputer

Package MixSim. April 29, 2017

Package nos. September 11, 2017

Package CausalImpact

Package raker. October 10, 2017

Package geneslope. October 26, 2016

Package DCD. September 12, 2017

Package validara. October 19, 2017

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package sgmcmc. September 26, Type Package

Package glmnetutils. August 1, 2017

Package ClustGeo. R topics documented: July 14, Type Package

Package IATScore. January 10, 2018

Package TestDataImputation

Package epitab. July 4, 2018

Package binomlogit. February 19, 2015

Package corclass. R topics documented: January 20, 2016

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package glassomix. May 30, 2013

Package rcv. August 11, 2017

Package GenSA. R topics documented: January 17, Type Package Title Generalized Simulated Annealing Version 1.1.

Package texteffect. November 27, 2017

Package ConvergenceClubs

Package NetworkRiskMeasures

Package jstree. October 24, 2017

Package sbrl. R topics documented: July 29, 2016

Package quadprogxt. February 4, 2018

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package bayeslongitudinal

Package sizemat. October 19, 2018

Package nonlinearicp

Package hergm. R topics documented: January 10, Version Date

Package widyr. August 14, 2017

Package simsurv. May 18, 2018

Package Mondrian. R topics documented: March 4, Type Package

Package cwm. R topics documented: February 19, 2015

Package estprod. May 2, 2018

Package ecoseries. R topics documented: September 27, 2017

Package fastqcr. April 11, 2017

Package clusternomics

Package rfsa. R topics documented: January 10, Type Package

Package optimus. March 24, 2017

Package lxb. R topics documented: August 29, 2016

Package tidylpa. March 28, 2018

Package crossrun. October 8, 2018

Package OsteoBioR. November 15, 2018

Package stapler. November 27, 2017

Package waver. January 29, 2018

Transcription:

Package manet August 23, 2018 Title Multiple Allocation Model for Actor-Event Networks Version 2.0 Mixture model with overlapping clusters for binary actor-event data. Parameters are estimated in a Bayesian framework. Model and inference are described in Ranciati, Vinciotti, Wit (2017) Modelling actor-event network data via a mixture model under overlapping clusters. Submitted. Depends R (>= 3.3), MCMCpack, combinat, igraph, mclust License GPL-2 Encoding UTF-8 LazyData true RoxygenNote 6.0.1 NeedsCompilation no Author Saverio Ranciati [aut], Veronica Vinciotti [cre], Ernst Wit [aut] Maintainer Veronica Vinciotti <veronica.vinciotti@brunel.ac.uk> Repository CRAN Date/Publication 2018-08-23 15:02:15 UTC R topics documented: concerts........................................... 2 deepsouth.......................................... 3 manet............................................ 4 mixtbern........................................... 5 noordin........................................... 6 plot.manet.......................................... 6 print.manet......................................... 7 summary.manet....................................... 8 Index 9 1

2 concerts concerts Concerts synthetic network Format Details Synthetic data matrix of dimension n x d, recording attendances of n=500 people to d=14 concerts from 14 different artists. There are three clusters in the data, each one corresponding to a community of fans of a specific musical genre. Overlaps of these fandoms point towards attendances dictated by artists playing music from sub-genres - such as electropop. concerts A data frame with 500 rows and 14 variables 14 concerts attendended: "Blondie", "Fleetwood Mac", "Paramore", "Queen", "St.Vincent", "The Queen", "Pet Shop Boys", "M83", "Daft Punk", "Goldfrapp", "Chvrches", "LaRoux", "Robyn", "BANKS" 500 attendees #DATA GENERATION z_ext <-function(x,nfac){ nq <- length(x) zx <- hcube(rep(nq,nfac)) zx <- zx[,dim(zx)[2]:1] z2 <- matrix(x[zx],dim(zx)[1],dim(zx)[2]) return(z2) } K=3 # main clusters: Rock (cluster h=5), Pop (cluster h=3), Electronic (cluster h=2) K_star=2^K n=500 #attendees set.seed(777) u=z_ext(0:1,k) alpha_star=rep(0,k_star) alpha_star=c(0.05,0.10,0.35,0.15,0.25,0.00,0.10,0.00) index=rep(0,n) for(i in 1:n) index[i]=sample(1:k_star,1,prob=alpha_star) d=14 #concerts/artists y<-matrix(0,n,d) colnames(y)=c("blondie", "Fleetwood Mac", "Paramore","Queen","St.Vincent", "The Queen", "Pet Shop Boys","M83","Daft Punk", "Goldfrapp", "Chvrches", "LaRoux", "Robyn","BANKS")

deepsouth 3 pi.greco=matrix(0,k,d) rownames(pi.greco)=c("rock","pop","electronic") colnames(pi.greco)=colnames(y) pi.greco[1,]=c(0.80,0.80,0.80,0.70,0.90,0.80,0.10,0.10,0.05,0.05,0.10,0.05,0.05,0.10) pi.greco[2,]=c(0.10,0.10,0.90,0.80,0.90,0.80,0.05,0.10,0.05,0.70,0.70,0.05,0.80,0.05) pi.greco[3,]=c(0.05,0.05,0.05,0.10,0.05,0.05,0.80,0.90,0.90,0.80,0.70,0.80,0.90,0.90) for (i in 1:n) for(j in 1:d) y[i,j]<-rbinom(1,1,prob=ifelse(sum(u[index[i],])==0,0.00000001,min(pi.greco[,j]^u[index[i],]))) #y is the 500x14 matrix of data #RUNNING MANET ## Not run: data(concerts) start=sys.time() crt<-manet(concerts,k=3,maxt=5000) finish=sys.time() finish-start #Time difference of 11.58112 mins plot(crt) summary(crt) alloc<-summary(crt)$actor.allocations[,2] adjustedrandindex(index,alloc) #0.8420733 classerror(alloc,index)$errorrate #0.07 ## End(Not run) deepsouth Deep South Network Format Source This is a data set of 18 women observed over a nine-month period. During that period, various subsets of these women met in a series of 14 informal social events. The data recored which women met for which events. deepsouth A data frame with 18 rows and 14 variables Davies et al (1941) Deep South: A sociological anthropological study of caste and class. University of Chicago Press.

4 manet manet Multiple allocation clustering of actor-event networks This function infers K multiple allocation cluster for actor-event network data. manet(y, K = 2, maxt = 5000, seed = 1, link = "min", verbose = FALSE) y Value A n x d actor-event adjacency matrix, whereby y_ij is 1 if actor i attended event j 0 otherwise. K Number of multiple clusters. Default is set to 2. maxt Number of MCMC iterations. Default is set to 5000. seed Random seed. Default is 1. link verbose Method to combine the parameters of the parent clusters into the parameter for the heir cluster. Default is "min". The alternative is "max". Set to TRUE if you want to see the steps of the MCMC iterations. Defaults is FALSE. A manet object consisting of a list with five outputs: p.allocation.chain A maxt x n x 2^K array with the posterior probabilities of allocation to the heir clusters. p.event.chain A maxt x K x d array with the cluster - posterior probabilities of attendance to events. p.community.chain A maxt x 2^K matrix with the heir cluster proportions. parent.heir.cluster A 2^K x K matrix, which indicates the relationship between parent and heir clusters. adj The original adjacency matrix. proc.time The computational time. ds<-manet(deepsouth,k=2,maxt=100) plot(ds) summary(ds)

mixtbern 5 mixtbern Single allocation clustering in networks This function infers K single allocation cluster for actor-event network data. mixtbern(y, K = 4, maxt = 5000, seed = 1, verbose = FALSE) y A n x d actor-event adjacency matrix, whereby y_ij is 1 if actor i attended event j 0 otherwise. K Number of single clusters. Default is set to 4. maxt Number of MCMC iterations. Default is set to 5000. seed Random seed. Default is 1. verbose Set to TRUE if you want to see the steps of the MCMC iterations. Defaults is FALSE. Value A manet object consisting of a list with five outputs: p.allocation.chain A maxt x n x K array with the posterior probabilities of allocation to the heir clusters. p.event.chain A maxt x K x d array with the cluster - posterior probabilities of attendance to events. p.community.chain A maxt x K matrix with the heir cluster proportions. adj The original adjacency matrix. proc.time The computational time. ds<-mixtbern(deepsouth,k=2,maxt=100) plot(ds) summary(ds)

6 plot.manet noordin Noordin Top terrorist network The Noordin Top Terrorist Network Data were drawn primarily from "Terrorism in Indonesia: Noordin s Networks," a publication of the International Crisis Group, and include relational data on 79 individuals discussed in that publication. The dataset includes information on these individuals affiliations with terrorist/insurgent organizations, educational institutions, businesses, and religious institutions. noordin Format A data frame with 79 rows and 45 variables Details 45 events attendended: eight organizations, five operations (bombings), eleven training events, two financial meetings, seven logistic meetings, twelve general meetings 79 terrorists, as documented in Everton (2012) but including also the five "lone wolves" (last five rows) Source Everton (2012) Disrupting dark networks 34. Cambridge University Press. plot.manet Plotting the output from the multiple allocation clustering. This function plots the output of the manet function. ## S3 method for class 'manet' plot(x, seed = 1, layout = layout_nicely,...)

print.manet 7 x A manet object. seed Random seed. Default is 1. layout Layout of the network from the igraph package. Default is layout_nicely.... Additional inputs to the igraph function. Value An actor-event network with events as round circles and actors as squared circles with the different colours corresponding to the identified communities. ds<-manet(deepsouth,k=2,maxt=100) plot(ds) print.manet Printing the output from the multiple allocation clustering This function prints the output of the manet function ## S3 method for class 'manet' print(x, digits = 3,...) x A manet object. digits Number of digits. Default is 3.... Additional arguments to the print function. ds<-manet(deepsouth,k=2,maxt=100) print(ds)

8 summary.manet summary.manet Summarising the output from the multiple allocation clustering This function summarises the output of the manet function ## S3 method for class 'manet' summary(object, digits = 3,...) object A manet object. digits Number of digits. Default is 3.... Additional arguments to the summary function. ds<-manet(deepsouth,k=2,maxt=100) summary(ds)

Index Topic actor-event, Topic datasets concerts, 2 deepsouth, 3 noordin, 6 Topic mixture Topic models, Topic networks concerts, 2 deepsouth, 3 noordin, 6 plot.manet, 6 print.manet, 7 summary.manet, 8 9