## Approximate - log[Ga] using mixture of normals.
sp = 9
nm = compute.mixture(sp, "log.gamma")
nc = length(nm$m)
r = sample.int(nc, 10, replace=TRUE, prob=nm$p)
e = rnorm(10, nm$m[r], sqrt(nm$v[r]))
r.post = draw.indicators(e, nm)
## Approximate type III logistic using mixture of normals.
sp = 9
nm = compute.mixture(sp, "logistic.iii")
nc = length(nm$m)
r = sample.int(nc, 10, replace=TRUE, prob=nm$p)
e = rnorm(10, nm$m[r], sqrt(nm$v[r]))
r.post = draw.indicators(e, nm)
Run the code above in your browser using DataLab