After determining the simulated distributions are satisfactory, it can be advantageous to bind the simulated distributions together in order to aggregate values and perform other manipulations and analyses.
1 2 3
An object of class
For the purposes of this function, it is assumed that if the simulated distributions are satisfactory, the multiple chains in a run can be bound together. Subsequently, the multiple runs are bound together. Lastly, the factors are relabeled, if requested.
Jarrod Dalton and Benjamin Nutter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#' data(PE, package="HydeNet") Net <- HydeNetwork(~ wells + pe | wells + d.dimer | pregnant*pe + angio | pe + treat | d.dimer*angio + death | pe*treat, data = PE) compiledNet <- compileJagsModel(Net, n.chains=5) #* Generate the simulated distribution Simulated <- HydeSim(compiledNet, variable.names = c("d.dimer", "death"), n.iter=1000) Bound <- bindSim(Simulated) #* Bind a Decision Network #* Note: angio shouldn't really be a decision node. #* We use it here for illustration Net <- setDecisionNodes(Net, angio, treat) compiledDecision <- compileDecisionModel(Net, n.chains=5) SimulatedDecision <- HydeSim(compiledDecision, variable.names = c("d.dimer", "death"), n.iter = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.