statnet / ergm.ego

Fit, Simulate and Diagnose Exponential-Family Random Graph Models to Egocentrically Sampled Network Data https://statnet.org
Other
14 stars 4 forks source link

ergm.ego() fails on curved terms. #61

Closed krivit closed 3 years ago

krivit commented 3 years ago
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)

krivit commented 3 years ago

@martinamorris, this is the issue we ran into on (my) Friday morning.