CompLogML {dga} | R Documentation |
Assembles all of the pieces of the marginal likelihoods to be used to calculate the posterior probability of each model/value of Nmissing.
CompLogML(D, Nmissing, delta)
D |
A marginal array of the list overlap counts. |
Nmissing |
The vector of possible values for the missing cell. |
delta |
The prior hyper parameter for the Dirichlet distribution. |
The log marginal likelihood of the marginal table.
James Johndrow james.johndrow@gmail.com and Kristian Lum kl@hrdag.org
Madigan, David, and Jeremy C. York. "Bayesian methods for estimation of the size of a closed population." Biometrika 84.1 (1997): 19-31.
Y <- c(0, 27, 37, 19, 4, 4, 1, 1, 97, 22, 37, 25, 2, 1, 3, 5,
83, 36, 34, 18, 3, 5, 0, 2, 30, 5, 23, 8, 0, 3, 0, 2)
Y <- array(Y, dim = c(2, 2, 2, 2, 2))
# Compute marginal array over lists 1 and 3
D <- apply(Y, c(1, 3), sum)
dga:::CompLogML(D, 1:300, 0.5)