library(ergm.ego)
data(faux.mesa.high)
fmh.ego <- as.egor(faux.mesa.high)
egofit <- ergm.ego(fmh.ego~edges+degree(0:3)+nodefactor("Race")+nodematch("Race")
+nodefactor("Sex")+nodematch("Sex")+absdiff("Grade")+gwesp(fix=FALSE),
popsize=network.size(faux.mesa.high))
#> Constructing pseudopopulation network.
#> Error in ergm.ego(fmh.ego ~ edges + degree(0:3) + nodefactor("Race") + : There appears to be a mismatch between estimated statistic and the sufficient statistic of the ERGM: statistics 'gwesp' and 'gwesp.decay' required by the ERGM could not be estimated from data. A common cause of this is that egos and alters do not have a consistent set of levels for one or more factors.
Created on 2021-06-05 by the reprex package (v2.0.0)