Skip to content
Prev 327604 / 398502 Next

MCMClogit: Cannot calculate marginal likelihood with improper prior

Hi, 

what I see so far is that you have specified your user.prior.density correctly. The error comes from the prior precision matrix "B0" in combination with the marginal.likelihood set to "Laplace". B0, if not explicitly specified, defaults to zero, which results in eigenvalues of zero. If "Laplace" is indicated for the marginal.likelihood, the algorithm usually calls an optimization over "logpost.logit" in "BayesianFactors.R" where the matrix B0 is tried to be solved by solve(B0) ... as it is a zero matrix its linear equation system is exactly singular and cannot be solved. The Function MCMClogit knows about this fact and gives out a warning "Cannot calculate marginal likelihood with improper prior" while changing marginal.likelihood to "none".

So concluding: Choose your user.prior.density with marginal.likelihood = "none" and all is fine (implicitly it is done so nevertheless).

Best

Simon

P.S. Using a name on a community help list will certainly improve the number of answers to your questions.
On Jul 29, 2013, at 3:00 AM, ba0728 <haleybeck at att.net> wrote: