nimble-dev / nimble

The base NIMBLE package for R
http://R-nimble.org
BSD 3-Clause "New" or "Revised" License
156 stars 23 forks source link

robustify checking stickbreaking conjugacy #1444

Closed paciorek closed 4 months ago

paciorek commented 4 months ago

This fixes issue #1409.

Formerly we simply looked to see if the target was a name in the structureExpr. This is not sufficient to check for valid conjugacy. We need that the target appears on its own (and only once) as an element of the vector argument to stick_breaking. This change modifes the checking in cc_checkStickbreaking to do that.