Learn R Programming

ergm.ego (version 0.6.1)

gof.ergm.ego: Conduct Goodness-of-Fit Diagnostics on a Exponential Family Random Graph Model fit to Egocentrically Sampled Data

Description

gof.ergm.ego implements the gof method for ergm.ego fit objects.

Usage

# S3 method for ergm.ego
gof(
  object,
  ...,
  GOF = c("model", "degree"),
  control = control.gof.ergm(),
  verbose = FALSE
)

Arguments

object

An ergm.ego fit.

Additional arguments, currently unused.

GOF

A string specifying the statistics whose goodness of fit is to be evaluated. Currently, only “degree” and “model” are implemented; see gof documentation for details.

control

A list to control parameters, constructed using control.gof.formula or control.gof.ergm (which have different defaults).

verbose

Provide verbose information on the progress of the simulation.

Value

An object of class gofobject.

See Also

For examples, see ergm.ego.

Examples

Run this code
# NOT RUN {
data(faux.mesa.high)
fmh.ego <- as.egodata(faux.mesa.high)

head(fmh.ego)

egofit <- ergm.ego(fmh.ego~edges+degree(0:3)+nodefactor("Race")+nodematch("Race")
                         +nodefactor("Sex")+nodematch("Sex")+absdiff("Grade"), 
                          popsize=network.size(faux.mesa.high))

# Check whether the model "converged":
(modelgof <- gof(egofit, GOF="model"))
plot(modelgof)
# }
# NOT RUN {
# Check whether the model reconstructs the degree distribution:
(deggof <- gof(egofit, GOF="degree"))
plot(deggof)
# }

Run the code above in your browser using DataLab