set.seed(1)
#
#Example: Density (Normal)
#
CCMnet_Result = CCMnet_constr(Network_stats= c('Density'),
Prob_Distr=c('Normal'),
Prob_Distr_Params=list(list(.04, .0001)),
samplesize = 5000,
burnin=1000,
interval=100,
statsonly=TRUE,
P=NULL,
population=100,
covPattern = NULL,
remove_var_last_entry = FALSE)
statsmatrix = CCMnet_Result[[1]]
G_list = CCMnet_Result[[2]]
#Mean Network Density (Simulated Networks)
mean(statsmatrix)
#Variance of Network Density (Simulated Networks)
var(statsmatrix)
## Not run:
# #
# #Example: Degree Distribution (Dirichlet-multinomial)
# #
# CCMnet_Result = CCMnet_constr(Network_stats='DegreeDist',
# Prob_Distr='DirMult',
# Prob_Distr_Params=list(list(c(2,21,15,12))),
# samplesize = 10000,
# burnin=100000,
# interval=1000,
# statsonly=TRUE,
# P=NULL,
# population=500,
# covPattern = NULL,
# remove_var_last_entry = FALSE)
# statsmatrix = CCMnet_Result[[1]]
# G_list = CCMnet_Result[[2]]
#
# #Mean Degree Distribution (Simulated Networks)
# apply(statsmatrix, 2, mean)
# #Variance of Degree Distribution (Simulated Networks)
# apply(statsmatrix, 2, var)
#
# #
# #Example: Degree Distribution (Normal)
# #
# Prob_Distr_Params=list(NS_Multinomial(G_list[[1]],
# Network_stats = 'DegreeDist',
# mean_inflate = .05,
# var_inflate = 1.05))
#
# CCMnet_Result = CCMnet_constr(Network_stats='DegreeDist',
# Prob_Distr='Normal',
# Prob_Distr_Params=Prob_Distr_Params,
# samplesize = 50000,
# burnin=100000,
# interval=1000,
# statsonly=TRUE,
# P=NULL,
# population=500,
# covPattern = NULL,
# remove_var_last_entry = FALSE)
# statsmatrix = CCMnet_Result[[1]]
# G_list = CCMnet_Result[[2]]
#
# #Mean Degree Distribution (Simulated Networks)
# apply(statsmatrix, 2, mean)
# #Variance of Degree Distribution (Simulated Networks)
# apply(statsmatrix, 2, var)
#
# #
# #Example: Degree Mixing (Normal)
# #
# Prob_Distr_Params=list(NS_Multinomial(G_list[[1]],
# Network_stats = 'DegMixing',
# mean_inflate = .05,
# var_inflate = 1.05))
#
# CCMnet_Result = CCMnet_constr(Network_stats='DegMixing',
# Prob_Distr='Normal',
# Prob_Distr_Params=Prob_Distr_Params,
# samplesize = 50000,
# burnin=100000,
# interval=1000,
# statsonly=TRUE,
# P=NULL,
# population=500,
# covPattern = NULL,
# remove_var_last_entry = FALSE)
# statsmatrix = CCMnet_Result[[1]]
# G = CCMnet_Result[[2]]
#
# #Mean Degree Mixing (Simulated Networks)
# apply(statsmatrix, 2, mean)
# #Variance of Degree Mixing (Simulated Networks)
# apply(statsmatrix, 2, var)
#
#
# #
# #Example: Degree Mixing and Triangles (Normal, Normal)
# #
# Prob_Distr_Params=list(NS_Multinomial(G_list[[1]],
# Network_stats = 'DegMixing',
# mean_inflate = .05,
# var_inflate = 1.05),
# list(6,2))
#
# CCMnet_Result = CCMnet_constr(Network_stats=c('DegMixing', 'Triangles'),
# Prob_Distr=c('Normal', 'Normal'),
# Prob_Distr_Params=Prob_Distr_Params,
# samplesize = 50000,
# burnin=100000,
# interval=1000,
# statsonly=TRUE,
# P=NULL,
# population=500,
# covPattern = NULL,
# remove_var_last_entry = FALSE)
# statsmatrix = CCMnet_Result[[1]]
# G = CCMnet_Result[[2]]
#
# #Mean Degree Mixing and Number of Triangles (Simulated Networks)
# apply(statsmatrix, 2, mean)
# #Variance of Degree Mixing and Number of Triangles (Simulated Networks)
# apply(statsmatrix, 2, var)
# ## End(Not run)
Run the code above in your browser using DataLab