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

Support constraints= argument in btergm() and related functions. #25

Open
krivit opened this issue May 16, 2021 · 2 comments
Open

Support constraints= argument in btergm() and related functions. #25

krivit opened this issue May 16, 2021 · 2 comments

Comments

@krivit
Copy link

krivit commented May 16, 2021

Right now, btergm uses ergm.design(), which is a very crude function, because it only recognises constraints induced by NA. Using the ergm_conlist API might enable it to handle others. For this and other reasons, the use of ergm.design() is discouraged and I hope to deprecate it once no one is using it anymore.

@leifeld
Copy link
Owner

leifeld commented Apr 1, 2022

Thanks, @krivit. I haven't gotten around to it yet, but would like to follow your advice. If you have any suggestions on how to update it, that would be most helpful. I assume you are referring to this part?

nw <- ergm::ergm.getnetwork(form)
model <- ergm::ergm_model(form, nw, initialfit = TRUE)
Clist.miss <- ergm::ergm.design(nw, verbose = FALSE)
control.ergm$init <- c(rep(NA, length(l$rhs.terms) - 1), 1)
pl <- ergm::ergm.pl(nw,
                    Clist.miss,
                    model,
                    theta.offset = c(rep(FALSE, length(l$rhs.terms) - 1), TRUE),
                    verbose = FALSE,
                    control = control.ergm)

@krivit
Copy link
Author

krivit commented Apr 10, 2022

Yes, I think so. I think a good prototype to work off for this might be ergm::ergmMPLE().

Can you remind me:

  1. How does btergm() handle missing dyads?
  2. Does it support specifying sufficient statistics directly (a la target.stats= in ergm())?
  3. Do you (or do you want to) support the %ergmlhs% API?

The reason I ask is that there are varying degrees of sophistication with which one can handle constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants