Closed riher closed 3 years ago
I looked into it a bit more. It seems to be caused by the data (data.re) being passed as a tibble, not as a data frame.
As tidyverse is common and this is pretty obscure, applying as.data.frame
somewhere to the data would be quite helpful.
// Since this is a bug in mtc.network(), I'm wondering why it only appears when trying to fit a node-splitting model, while calling mtc.network() on its own works fine...
A similar error occurred with mtc.anohe
. It's also fixed by this change.
Hi Ricardo. Thanks for reporting and looking into this. The pull request is also much appreciated, I'll leave some feedback there.
I have also found one more problem with node-splitting model (gemtc v. 0.8-7; R v. 4.0.2). It occurs with the code which worked with absolutely no problem before.
gemtc_data - a tibble with study
, treatment
, responders
, and sampleSize
columns.
mynetwork <- mtc.network(data.ab = as.data.frame(gemtc_data), description = "Data1")
nodespl <- mtc.nodesplit(mynetwork, linearModel = .x, n.adapt = 20000, n.iter = 180000, n.chain = 3, thin = 3)
res <- summary(nodespl)$p.value %>% as_tibble()
There are several following warnings after both fixed and random models:
# rjags::jags.model(file.model, data = syntax[["data"]], inits = syntax[["inits"]], :
# Unused variable "om.scale" in data
Thanks, both issues have been fixed for the upcoming version.
Hey, first of all, thank you so much for this amazing package, you're doing god's work!
One problem I've stumbled upon though, not being able to resolve it: I can't create a node-splitting model. The error message I'm getting:
Version 0.8-7 of gemtc. Version 1.3.959 of RStudio Version 4.0.2 of R
I'd be very grateful for any pointers on how to get this to run.
Cheers