Skip to contents

Draws nsim replicates of Y from the fitted ALS mean structure: mu, beta, a, b, U, V, and the family-appropriate noise distribution. For directed unipartite normal, binary and Poisson fits, reciprocal dyads use the fitted rho. Binary IRLS fits use their stated marginal link and a Gaussian copula with the fitted dyadic correlation. Square bipartite networks retain their diagonal cells. The returned object has class "ame.sim" so it is compatible with plot_ppc_*-style consumers (where applicable).

Usage

# S3 method for class 'ame_als'
simulate(object, nsim = 1, seed = NULL, ...)

Arguments

object

an ame_als fit.

nsim

integer; number of replicates to simulate (default 1).

seed

optional RNG seed.

...

ignored.

Value

An object of class "ame.sim" with element Y – a list of nsim simulated outcome arrays (one matrix for a cross-section, one list-of-matrices per slice for a longitudinal fit).

Details

simulate.ame_als holds mu, beta, a, b, U, V at their estimates and resamples the noise, so the replicates do not carry the uncertainty of the estimates; their standard errors are in vcov(), confint() and summary(), and ame_als_bootstrap gives bootstrap ones.