ergmx.GofNResult#

class ergmx.GofNResult(names, table, networks, attributes, nsim)[source]#

Goodness of fit by network (gofN()): a GofNTable per statistic, by name. summary() summarizes them over the networks, plot() plots the residuals.

to_frame()[source]#

All statistics, one row per network and statistic, as a pandas DataFrame. Needs pandas.

summary(by=None)[source]#

Summaries over the networks, as ergm.multi’s summary(gofN); with by, an R expression of the networks’ attributes ("~n", "~I(n >= 4)"), for each of its values.

plot(stats=None, against=None, which=(1, 2), id_n=3, axes=None)[source]#

Each statistic’s Pearson residuals against the fitted values (or against, an R expression of the networks’ attributes, where .fitted is the fitted values), as ergm.multi’s plot(gofN): which chooses among 1, residuals; 2, the square root of their absolute values (scale-location); and 3, a normal Q-Q plot. A weighted local regression shows the trend, and the id_n most extreme residuals are labelled with their network. Needs matplotlib. Returns the figure.