Skip to content

Error when generating sampler for undirected graph with edges only #23

@gvegayon

Description

@gvegayon

The bug is generated in the following:

library(ergmito)
library(network)

set.seed(12314)

net <- network(matrix(0, nrow = 5, ncol = 5), directed = FALSE)
sampler1 <- new_rergmito(net ~ edges, theta = -1, force = TRUE)

This returns with an error:

Error: The sum of each network's probability does not equal to one. This may be due to model parameters that are too far away from 0. The current value of theta is: [-1.0000]. You should try with other parameters.

And it happens b/c the counter of sufficient statistics is double counting the edges term, since it is using count_stats instead of summary_formula from the ergm package. This bug is related to the fact that the sampler function is yet too complicated and needs to be simplified using the ergmito_formulae routine.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions