KL_net: Generates list of degree sequences and summary statistics for...

Description Usage Arguments Examples

View source: R/KL_net.R

Description

Generates list of degree sequences and summary statistics for a mechanistic model

Usage

 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
26
27
28
29
30
net_ss(
  theta_m,
  replicates = 1000,
  sorted = TRUE,
  mech_net,
  lstat,
  lapply_opt = TRUE,
  ergm = FALSE
)

process_ss(
  g,
  theta_s,
  mirror,
  type = "Bianconi",
  entropy_ss = FALSE,
  degree_triangle = FALSE
)

KL_ss(
  theta_m,
  theta_s,
  mirror = TRUE,
  type = "Bianconi",
  entropy_ss = FALSE,
  degree_triangle = FALSE,
  ...
)

KL_net(theta_m, ...)

Arguments

theta_m

numeric mechanistic model parameters

replicates

numeric number of replicates

sorted

logical whether to consider the sorted or unsorted degree sequence as the integral statistic

mech_net

function the mechanistic network simulator

lstat

function computes the likelihood statistic

lapply_opt

boolean internal

g

output of 'net_ss'

theta_s

statistical parameter

mirror

Boolean. whether base measure should be mirrored

type

String: either "Liebenau" or "Bianconi"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(StartNetwork)
n = 15
replicates = 400

mech_net_triangles <- purrr::partial(mech_net_triangles_n, n = !!n)
lstat = function(x){length(igraph::triangles(x))/3}

x = net_ss(
 theta_m = 0.3,
 replicates = 50,
 mech_net = mech_net_triangles,
 lstat = lstat
)

y = process_ss(x, 0.5, mirror = TRUE)

reprocess_ss(y, 0.6)

AnthonyEbert/StartNetwork documentation built on April 24, 2020, 3:28 a.m.