Closed jrisi256 closed 2 years ago
Thank you @jrisi256 . Looks like a bug in CRAN and master
versions of the package.
Interestingly when computed individually distance
works while espartners
fails (and in both cases model
is included even though it should not, but that's something separate):
gof(gest, GOF = ~ espartners - model) |>
plot()
## Error in out[, na.omit(i), drop = FALSE] : subscript out of bounds
gof(gest, GOF = ~ distance - model) |>
plot()
@jrisi256 until we fix it you can produce the gofplot for distances as in the above.
Given
gof(gest, GOF = ~ espartners - model) |>
plot()
## Error in out[, na.omit(i), drop = FALSE] : subscript out of bounds
It seems that i
computed at
https://github.com/statnet/ergm/blob/033dd693abd7c93d38daa938eea369fa645b83bb/R/gof.ergm.R#L502-L512
is too long (here 1:14
) for the actual dimension of out
being subscripted (here it is 100 x 13). The logic behind computing i
is obscure to me. Is this your design @krivit ?
Is this your design @krivit ?
"Design" isn't the right word. gof()
used to be a mess with a lot of repetition, which I eventually turned into a mess with less repetition.
This problem turns out to have been affecting not so much directed networks as any networks dense enough to have maximum observed ESP close to the size.
Do you know when this will be pushed to CRAN?
Do you know when this will be pushed to CRAN?
Already has been. It's up to CRAN now.
So for undirected graphs, plotting gof works fine. This example is taken directly from the help pages.
However for directed graphs, not all of the plots get plotted.
Specifically the geodesic distances (distance) and shared partner distributions (espartners) do not graph as I get the error:
Error in out[, na.omit(i), drop = FALSE] : subscript out of bounds
.From R Session Info: