simulate.lolog: Generates BinaryNetworks from a fit lolog object

Description Usage Arguments Value Examples

View source: R/lolog.R

Description

Generates BinaryNetworks from a fit lolog object

Usage

1
2
## S3 method for class 'lolog'
simulate(object, nsim = 1, seed = NULL, convert = FALSE, ...)

Arguments

object

A 'lolog' object.

nsim

The number of simulated networks

seed

Either NULL or an integer that will be used in a call to set.seed before simulating

convert

convert to a network object#'

...

unused

Value

A list of BinaryNet (or network if convert=TRUE) objects. Networks contain an additional vertex covariate "__order__" that indicates the sequence order in which the vertex was 'added' into the network.

Examples

1
2
3
4
5
6
7
library(network)
data(flo)
flomarriage <- network(flo,directed=FALSE)
flomarriage %v% "wealth" <- c(10,36,27,146,55,44,20,8,42,103,48,49,10,48,32,3)
fit <- lolog(flomarriage ~ edges + nodeCov("wealth"))
net <- simulate(fit)[[1]]
plot(net)

lolog documentation built on July 1, 2021, 9:09 a.m.