From the original model,
sp <-c(0.5, 0.5) # Supplier prob.
The discretized probabilities are captured in,
limits <-c(6.16, 6.19)
dsd <-matrix(c(diff(c(0, pnorm(limits, mu[1], sigma), 1)),
diff(c(0, pnorm(limits, mu[2], sigma), 1))),3, 2)
dimnames(dsd) <-list(D = c("thin", "average", "thick"),
S = c("s1", "s2"))
dsd # This is the conditional probability table
dsd[, 1] gives the probabilities of each rod size for supplier 1
thin average thick
0.88493033 0.07913935 0.03593032
New model:
model {
csup ~ dcat(sp);
cdiam ~ dcat(dsd[, csup]);
}