Skip to contents

Generates empty network of specified size and adds nodal attributes. Currently these attributes are specific to this project: a sex variable, race, age group, age, and an adjusted age variable used to capture reported age asymmetry in heterosexual partnerships in NSFG (females on average slightly younger than their male partners)

Usage

generate_init_network(params, seed = NULL, assign_deg_casual = FALSE)

Arguments

params

a list of parameters with a sublist called "pop" with the size of the network and the named attributes and their distribution in the population

seed

optional, used to set a seed to maintain the same distribution of nodal attributes every time function is called

assign_deg_casual

default = FALSE, if TRUE, uses additional parameters information in "params" to set a plausible casual degree for each node (to help fit main/long-term partnership network, which is usually fit first in workflow)

Value

an object of class network