-
Notifications
You must be signed in to change notification settings - Fork 3
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
Making setNode() and modelToNode() play together #20
Comments
Rather than putting this into As discussed in issue #7, |
There is an issue with (I think) modelToNode(). The output of writeNetworkModel in my "bag of models" example seems to be incorrect. All of the distributions in the JAGS code have " ~ " in the parameters. For example, the second "wells ~" should not be in the following expression: "wells ~ dnorm(wells ~ 3.79, 0.63)" g1 <- lm(wells ~ 1, data=PE) bagOfModels <- list(g1,g2,g3,g4,g5,g6,g7) bagNet <- HydeNetwork(bagOfModels) model{wells ~ dnorm(wells ~ 3.7941999999999, 0.630504251834359)pe ~ dbern(pe ~ ilogit(-3.90355 + 0.5757*wells))d.dimer ~ dnorm(d.dimer ~ 210.24251 + 68.37938_(pe==2) + 29.29496_(pregnant==2), 0.0334725036145318)pi.pregnant[1] <- 0.9014; pi.pregnant[2] <- 0.0986pregnant ~ dcat(pi.pregnant)angio ~ dbern(angio ~ ilogit(-2.22585 + 3.28411*(pe==2)))treat ~ dbern(treat ~ ilogit(-5.89316 + 0.01994_d.dimer + 1.73354_(angio==2)))death ~ dbern(death ~ ilogit(-4.18763 + 5.48082_(pe==2) + -1.93576_(treat==2)))} |
This has been resolved. |
HydeNetwork.list() is awesome.
It would be equally beneficial to be able to apply modelToNode() for individual nodes. I think this is as simple as making a network object argument to the modelToNode methods (set to NULL). By default the function will work as-is, i.e., as called from HydeNetwork.list(). But if the user feeds a network object to the method, it will:
Thoughts on its usefulness?
The text was updated successfully, but these errors were encountered: