| gof.ergm.ego | R Documentation |
gof.ergm.ego() implements the gof() method for
ergm.ego fit objects.
An enhanced plotting method is also provided, giving uncertainty bars for the observed statistics as well.
## S3 method for class 'ergm.ego'
gof(
object,
...,
GOF = c("model", "degree", "espartners"),
control = control.gof.ergm(),
verbose = FALSE
)
## S3 method for class 'gof.ergm.ego'
plot(x, ..., ego.conf.level = 0.95)
object |
An |
... |
Additional arguments. Unused by |
GOF |
A string specifying the statistics whose goodness of fit is to be
evaluated. Currently, only “degree”, “espartners” and “model” are
implemented; see |
control |
A list to control parameters, constructed using
|
verbose |
Provide verbose information on the progress of the simulation. |
x |
an object returned by |
ego.conf.level |
confidence level for the observed statistic estimates as well. |
An object of class gof.ergm.ego, inheriting from gof.ergm().
Pavel N. Krivitsky
David R. Hunter, Steven M. Goodreau, and Mark S. Handcock (2008). "Goodness of Fit of Social Network Models." Journal of the American Statistical Association, 103:481: 248–258. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/016214507000000446")}
For examples, see ergm.ego().
data(faux.mesa.high)
fmh.ego <- as.egor(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)
# Check whether the model reconstructs the degree distribution:
(deggof <- gof(egofit, GOF="degree"))
plot(deggof)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.