Re: [R] about MCMC pack

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Thu 18 May 2006 - 02:15:24 EST

          I'm not able to replicate the error. The first example in the "MCMCirtKd" help file worked fine for me. It ran in under 4 minutes on my computer. The "plot" produced several pages of output, which required manual intervention to move from one to the next. The 'summary' command also seemed to perform appropriately, without an error message. I killed the second example after about 15 minutes of compute time, so I don't know if it would have worked or not. You might get better help if you provide a simple, self-contained example that actually replicates the error message you got (as suggested in the posting guide, www.R-project.org/posting-guide.html).

          What have you tried to simplify the problem? For example, can you find numbers smaller than 'burnin = 1000, mcmc = 10000' for which you get the same problem, e.g., "burnin=2, mcmc=2" or 'burnin=100, mcmc=100'? If yes, that should substantially reduce the time required to isolate this problem.

          Also, if you change some of the arguments, when do you get the problem and when does it disappear? I noticed you specified 'thin=1, verbose = 1, seed = NA,alphabeta.start = NA, b0 = 0, B0=0, store.item = FALSE, store.ability=FALSE, drop.constant.items=TRUE'. All but one of these is at its default value. In R, arguments assuming their default values do not have to be provided. If dropping one of these arguments changes the behavior of the function, that's a problem.

          In particular, what do you get with the default value for 'item.constraints'? If the problem goes away, that suggests you need to be more careful about specifying 'item.constraints'.

          If this fails, my next step is 'debug': You can make local copies of MCMCirtKd (and MCMCordfactanal, which it calls to do most of the work) and follow along, step by step, until you find where it bombs -- and hopefully also in the process figure out what to change to fix it.

	  hope this helps.
	  Spencer Graves

p.s. Please also include 'sessionInfo()'; otherwise, potential respondents don't know if you are using an obsolete version of something   that might already have been fixed. My sessionInfo() is as follows:

Version 2.3.0 (2006-04-24)
i386-pc-mingw32

attached base packages:
[1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base"

other attached packages:
MCMCpack MASS coda lattice
  "0.7-1" "7.2-27" "0.10-5" "0.13-8"

Mariagiulia Matteucci wrote:
> Hello,
> I tryed to use the MCMC pack, particularly the function MCMCirtKd to
> simulate the posterior distribution in a multidimensional IRT model.
> The code I used is:
>
> posterior1 <- MCMCirtKd(Y, dimensions=2,
> item.constraints=list("V2"=list(3,0)),
> burnin = 1000, mcmc = 10000, thin=1, verbose = 1, seed = NA,
> alphabeta.start = NA, b0 = 0, B0=0, store.item = FALSE,
> store.ability=FALSE, drop.constant.items=TRUE)
>
>
> where Y is a matrix subjects x items (1500 x 32) of simulated response
> sequences.
>
> After running the program, if I ask for a plot or summary of the MCMC
> object "posterior1", I obtain this message:
>
>
> Error in as.matrix.mcmc(x) : the lenght of'dimnames' [2] doesn't
> coincide with the array extension
> More: Warning message:
> the number of elements to replace is not a multiple of the lenght of
> replacement
>
>
> I cannot interpret this warning message, thank you for help or
> suggestions!
>
> Mariagiulia
>
>
>
>
> Mariagiulia Matteucci
> Dipartimento di Scienze Statistiche “Paolo Fortunati”
> Università di Bologna
> Via Belle Arti, 41
> 40126 Bologna (ITALY)
> e-mail: matteucci@stat.unibo.it
> TEL: +39 051 272503
> FAX: +39 051 232153
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 18 02:23:55 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 18 May 2006 - 04:10:10 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.