nimble-dev / nimble

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

categorical sampler has length control parameter #1447

Closed danielturek closed 5 months ago

danielturek commented 5 months ago

The title says it all.

Following suggestions in NCT # 505.

danielturek commented 5 months ago

Specifically, this addresses using the categorical sampler on distributions other than dcat. In such case, the issue is to determine the number of possible outcomes (or categories) k, where the distribution outcomes are the values $(1, 2, 3, \ldots, k).$

In support of that, this PR:

paciorek commented 5 months ago

@danielturek I used the control element named check to be able to turn off some checking in the (new) PG sampler. Maybe we should use that instead of anyDistributionOK. I can change it if you're ok with that.

danielturek commented 5 months ago

@paciorek Change just made on a branch, with PR, please merge it if it looks good.