gof.bigergm {bigergm} | R Documentation |
Conduct Goodness-of-Fit Diagnostics on a Exponential Family Random Graph Model for big networks
Description
A sample of graphs is randomly drawn from the specified model. The first
argument is typically the output of a call to bigergm
and the
model used for that call is the one fit.
By default, the sample consists of 100 simulated networks, but this sample
size (and many other settings) can be changed using the ergm_control
argument described above.
Usage
## S3 method for class 'bigergm'
gof(
object,
...,
type = "full",
control_within = ergm::control.simulate.formula(),
seed = NULL,
nsim = 100,
compute_geodesic_distance = TRUE,
start_from_observed = TRUE,
simulate_sbm = FALSE
)
Arguments
object |
An |
... |
Additional arguments, to be passed to |
type |
the type of evaluation to perform. Can take the values |
control_within |
MCMC parameters as an instance of |
seed |
the seed to be passed to simulate_bigergm. If |
nsim |
the number of simulations to employ for calculating goodness of fit, default is 100. |
compute_geodesic_distance |
if |
start_from_observed |
if |
simulate_sbm |
if |
Value
gof.bigergm
returns a list with two entries.
The first entry 'original' is another list of the network stats, degree distribution, edgewise-shared partner distribution, and geodesic distance distribution (if compute_geodesic_distance = TRUE
) of the observed network.
The second entry is called 'simulated' is also list compiling the network stats, degree distribution, edgewise-shared partner distribution, and geodesic distance distribution (if compute_geodesic_distance = TRUE
) of all simulated networks.
Examples
data(toyNet)
# Specify the model that you would like to estimate.
data(toyNet)
# Specify the model that you would like to estimate.
model_formula <- toyNet ~ edges + nodematch("x") + nodematch("y") + triangle
estimate <- bigergm(model_formula,n_blocks = 4)
gof_res <- gof(estimate,
nsim = 100
)
plot(gof_res)