generateDynppsbm: Data under dynppsbm

Description Usage Arguments Value References Examples

View source: R/generator.R

Description

Generate data under dynppsbm

Usage

1
generateDynppsbm(intens, Time, n, prop.groups, directed = TRUE)

Arguments

intens

List containing intensity functions α^{(q,l)} and upper bounds of intensities

Time

Final time

n

Total number of nodes

prop.groups

Vector of group proportions (probability to belong to a group), should be of length Q

directed

Boolean for directed (TRUE) or undirected (FALSE) case. If directed=TRUE then intens should be of length Q^2 and if directed =FALSE then length Q*(Q+1)/2

Value

Simulated data, latent group variables and intensities α^{(q,l)}

References

ANDERSEN, P. K., BORGAN, Ø., GILL, R. D. & KEIDING, N. (1993). Statistical models based on counting processes. Springer Series in Statistics. Springer-Verlag, New York.

DAUDIN, J.-J., PICARD, F. & ROBIN, S. (2008). A mixture model for random graphs. Statist. Comput. 18, 173–183.

MATIAS, C., REBAFKA, T. & VILLERS, F. (2018). A semiparametric extension of the stochastic block model for longitudinal networks. Biometrika.

MATIAS, C. & ROBIN, S. (2014). Modeling heterogeneity in random graphs through latent space models: a selective review. Esaim Proc. & Surveys 47, 55–74.

Examples

 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
# Generate data from an undirected graph with n=10 individuals and Q=2 clusters

# equal cluster proportions
prop.groups <- c(0.5,0.5)

# 3 different intensity functions :
intens <- list(NULL)
intens[[1]] <- list(intens= function(x) 100*x*exp(-8*x),max=5)
    # (q,l) = (1,1)
intens[[2]] <- list(intens= function(x) exp(3*x)*(sin(6*pi*x-pi/2)+1)/2,max=13)
    # (q,l) = (1,2)
intens[[3]] <- list(intens= function(x) 8.1*(exp(-6*abs(x-1/2))-.049),max=8)
    # (q,l) = (2,2)

# generate data :
obs <- generateDynppsbm(intens,Time=1,n=10,prop.groups,directed=FALSE)

# latent variables (true clustering of the individuals)
obs$z

# number of time events :
length(obs$data$time.seq)

# number of interactions between each pair of individuals:
table(obs$data$type.seq)

ppsbm documentation built on March 19, 2018, 5:03 p.m.