cmrNodeswap.Rd
Conducts node-swap randomisations for CMRnet outputs
cmrNodeswap(cmrnet, n.rand, multi = FALSE)
cmrnet | A CMRnet object from |
---|---|
n.rand | The number of permuted matrices to be conducted by the rmperm() algorithm |
multi | (TRUE/FALSE). Indicates whether the input object is a monolayer network (from |
The randomised networks. If multi=FALSE then this consists of a list in which each element of the list corresponds to a particular network window and contains an array consisting of all of the randomised networks. If multi=TRUE then this consists of a nested list arrangement in which each element of the first list corresponds to a particular network window, and each element of the second list a layer of the multiplex for that network window. Each element of the second level contains an array consisting of all of the randommised versions of that layer in that network window
This function conducts network permutations of CMRnet objects, acting as a wrapper for sna::rmperm()
if (FALSE) { # example without multiple layers #### # load in data data(cmrData) # set parameters mindate<-"2010-01-01" maxdate<-"2015-01-01" intwindow<-60 netwindow<-12 overlap<-0 # create network movenetdat<-MoveNetCreate(data=cmrData, intwindow=intwindow, mindate=mindate, maxdate=maxdate, netwindow=netwindow, overlap=overlap, nextonly=TRUE) # run permutations A<-cmrNodeswap(movenetdat,n.rand=1000) # example with multiple layered networks #### # load in data data(cmrData2) # set parameters mindate<-"2010-01-01" maxdate<-"2015-01-01" intwindow<-60 netwindow<-12 overlap<-0 # create network multimovenetdat<-MultiMoveNetCreate(data=cmrData2, intwindow=intwindow, mindate=mindate, maxdate=maxdate, netwindow=netwindow, overlap=overlap, nextonly=TRUE) # run permutations B<-cmrNodeswap(multimovenetdat,n.rand=1000,multi=TRUE) }