[R] Error Message: MCMCpack and coda

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Oct 31 23:11:27 CET 2004


On Sun, 31 Oct 2004 rbest1 at binghamton.edu wrote:

> Hello All,
> 
> I'm trying to run a one-dimenional irt model using the packages MCMC and
> coda on a rather large set of roll-call voting data with many missing
> observations.  Here's a sample of the code:
> Post10<-
> MCMCirt1d (Italy10, burnin = 1000, mcmc=50000, thin=100, verbose=TRUE,
> theta.constraints = list(V549=1, V443=-1))
> 
> The MCMCirt1d command seems to work fine, but when I try to summarize the
> output I get the following error message(s):
> 
> summary(Post10)
> Error: NA/NaN/Inf in foreign function call (arg 1)
> In addition: Warning message:
> Step size truncated due to divergence
> 
> My understanding is that this has something to do with the missing data,
> though I don't know how to address this issue.  Any help would be greatly
> appreciated.

Your understanding is not correct:  NaN and Inf result from numeric 
overflow, divide by zero and similar.

When you get an error message, try traceback() to see where it came from.
This came from a `foreign', that is .C or .Fortran, call, passing in a NaN 
or Inf or NA, and probably one of the first two given the warning on 
divergence.  But without a tracebacl() we don't know which call.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list