Skip to content

Steps in processing BUGS code

perrydv edited this page May 10, 2017 · 1 revision

Steps in processing BUGS code:

These steps are in BUGS_modelDef.R, in modelDefClass::setupModel.

Running example:

declInfo is a list of BUGSdeclClass objects. One for each BUGS declaration.

contexts is a list of BUGS declaration contexts (for loop information). Each BUGSdeclClass has one contextID, indexing which element of contexts it needs.

  • Early steps: Many early steps are relatively simple and commented in modelDefClass::setupModel

  • addIndexVarsToDeclInfo lets each BUGSdeclClass object know the names of for loop indices.

  • genSymbolicParentNodes extracts the names and of parent nodes, with corresponding indices.

  • genReplacementsAndCodeReplaced

Clone this wiki locally