statnet / lolog

Latent Order Logistic (LOLOG) Graph Models
Other
5 stars 1 forks source link

Unable to specify cluster in lolog() function when formula includes a constraint #9

Open thelondonsimon opened 1 month ago

thelondonsimon commented 1 month ago

When attempting to fit a model which includes + constraint(boundedDegree(X,Y)), including a cluster argument generates an error.

library(lolog)
library(statnet)
library(parallel)
data(florentine)
cl <- makeCluster(2)
fit <- lolog(flomarriage ~ edges + constraint(boundedDegree(1,100)), cluster = cl)

gives the following output

Initializing Using Variational Fit
Initial Theta:
 -1.609438 
Iteration 1
Error in dimnames(x) <- dn : 
  length of 'dimnames' [2] not equal to array extent

The model fit runs without issue if the cluster argument is removed.

ifellows commented 1 month ago

Thank you for the report. I can confirm the error.

I am just getting back from vacation and so please give me a little bit to address this and the other issues you've opened.