Learn R Programming

missSBM (version 0.3.0)

missSBM_collection: An R6 class to represent a collection of SBM fits with missing data

Description

The function estimateMissSBM() fits a collection of SBM with missing data for a varying number of block. These models with class missSBM_fit are stored in an instance of an object with class missSBM_collection, described here.

Fields are accessed via active binding and cannot be changed by the user.

This class comes with a set of R6 methods, some of them being useful for the user and exported as S3 methods. See the documentation for show(), print() and smooth(), the latter being used to smooth the ICL on a collection of model, as post-treatment.

Arguments

Active bindings

models

a list of models

ICL

the vector of Integrated Classification Criterion (ICL) associated to the models in the collection (the smaller, the better)

bestModel

the best model according to the ICL

vBlocks

a vector with the number of blocks

optimizationStatus

a data.frame summarizing the optimization process for all models

Methods

Public methods

Method new()

constructor for networkSampling

Usage

missSBM_collection$new(
  partlyObservedNet,
  vBlocks,
  sampling,
  clusterInit,
  cores,
  trace,
  useCov
)

Arguments

partlyObservedNet

An object with class partlyObservedNetwork.

vBlocks

vector of integer with the number of blocks in the successively fitted models

sampling

The sampling design for the modelling of missing data: MAR designs ("dyad", "node") and NMAR designs ("double-standard", "block-dyad", "block-node" ,"degree")

clusterInit

Initial method for clustering: either a character in "hierarchical", "spectral" or "kmeans", or a list with length(vBlocks) vectors, each with size ncol(adjacencyMatrix), providing a user-defined clustering. Default is "hierarchical".

cores

integer for number of cores used. Default is 1.

trace

integer for verbosity (0, 1, 2). Default is 1. Useless when cores > 1

useCov

logical. If covariates are present in partlyObservedNet, should they be used for the inference or of the network sampling design, or just for the SBM inference? default is TRUE.

Method estimate()

method to launch the estimation of the collection of models

Usage

missSBM_collection$estimate(control)

Arguments

control

a list of parameters controlling the variational EM algorithm. See details of function estimateMissSBM()

Method smooth()

method for performing smoothing of the ICL

Usage

missSBM_collection$smooth(type, control)

Arguments

type

character, the type of smoothing: forward, backward, both

control

a list of parameters controlling the smoothing. See details of regular function smooth()

Method show()

show method for missSBM_collection

Usage

missSBM_collection$show()

Method print()

User friendly print method

Usage

missSBM_collection$print()

Method clone()

The objects of this class are cloneable with this method.

Usage

missSBM_collection$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
## Sample 75% of dyads in  French political Blogosphere's network data
adjacencyMatrix <- missSBM::frenchblog2007 %>%
  igraph::as_adj (sparse = FALSE) %>%
  missSBM::observeNetwork(sampling = "dyad", parameters = 0.25)
collection <- estimateMissSBM(adjacencyMatrix, 3:5, sampling = "dyad")
class(collection)

# }

Run the code above in your browser using DataLab