Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gvegayon opened this issue May 7, 2020 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@gvegayon
Copy link
Member

gvegayon commented May 7, 2020

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.

@gvegayon gvegayon added the bug Something isn't working label May 7, 2020
@gvegayon gvegayon self-assigned this May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant