Mariagiulia Matteucci wrote: > Hello, thank you very much for your previous answers about the C++ code. > I am interested in the application of the Gibbs Sampler in the IRT > models, so in the function MCMCirt1d and MCMCirtkd. I've found the C++ > source codes, as you suggested, but I cannot find anything about the > Gibbs Sampler. All the files are for the Metropolis algorithm.
$ cd MCMCpack/ $ grep -ir gibbs . produces loads of output, including: ./src/MCMCfactanal.cc: } // end Gibbs loop ./src/MCMChierEI.cc:// and slice sampling and Gibbs sampling to sample from the posterior ./src/MCMCirt1d.cc: } // end Gibbs loop ./src/MCMCmixfactanal.cc: // Gibbs Sampler // ./src/MCMCmixfactanal.cc: } // end Gibbs loop ./src/MCMCoprobit.cc: // Gibbs loop ./src/MCMCordfactanal.cc: // Gibbs Sampler // ./src/MCMCpanel.cc:// simulate from posterior density and return a Gibbs by parameters matrix ./src/MCMCpanel.cc: const int* burnin, const int* gibbs, const int* thin, ./src/MCMCpanel.cc: int Mgibbs = gibbs[0]; ./src/MCMCpanel.cc: int Mtotiter = Mburnin + Mgibbs; ./src/MCMCpanel.cc: Matrix<double> beta_holder(Mgibbs/Mthin,Mp); ./src/MCMCpanel.cc: Matrix<double> D_holder(Mgibbs/Mthin,Mq*Mq); ./src/MCMCpanel.cc: Matrix<double> sigma2_holder(Mgibbs/Mthin, 1); ./src/MCMCpanel.cc: // gibbs loop ./src/MCMCregress.cc: // Gibbs sampler ./src/MCMCregress.cc: // second set of Gibbs scans ./src/MCMCSVDreg.cc: /////////////////// Gibbs sampler /////////////////// Perhaps some of these are useful? For your info, I know nothing about MCMCpack, I just know how to use grep to search for things. If you are on Windows, you can probably use the Windows File Explorer Search option to look for it. But give me grep anyday... Barry ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
