simulate_p2: Simulate networks from a p2 model

Description Usage Arguments Value

View source: R/p2.R

Description

The function can be used to simulate from an estimated model or from a given parameter value. In the latter case, the model settings are included in a fitted model object.

Usage

1
2
simulate_p2(objfit, nsim = 100, conditional = FALSE, theta = NULL,
  Sigma = NULL)

Arguments

objfit

An object produced by a call to fit_p2.

nsim

Number of simulated networks.

conditional

Should the random effects be set at the estimated values, or else simulated from the normal distribution? Default is FALSE.

theta

Parameter value to be used for the simulation. In case it is NULL, the theta slot of objfit is used.

Sigma

Variance matrix of random effects to be used for the simulation. In case it is NULL, the Sigma slot of objfit is used.

Value

Either a single network (when nsim=1) or a list of nsim networks. See network.


rugbel/p2model documentation built on March 8, 2021, 8:16 p.m.