Displaying 20 results from an estimated 3000 matches similar to: "MCMC in R"
2008 Jun 22
3
R vs. Bugs
A naive question from a non-statistician: I'm looking into running a
Bayesian analysis of a model with high dimensionality. It's not a
standard model (the likelihood requires a lot of code to implement),
and I'm using a Linux machine. Was wondering if someone
has any thoughts on what the advantages of OpenBugs are as
opposed to just R (or should I be thinking WinBUGS under Wine?)?
2009 Jul 02
1
MCMC/Bayesian framework in R?
Dear R-users (and developers),
I am looking for an efficient framework to carry out parameter
estimations based on MCMC (optionally with specified priors). My goal is
as follow:
* take ANY R-function returning a likelihood-value (this function may
itself call external programmes or other code!)
* run a sampler that covers the multidimensional parameter space (thus
creating a posterior
2008 Apr 08
2
Metropolis acceptance rates
Is there a way to recover Metropolis-step acceptance rates AFTER
completing posterior draws?
The immediate application is in the probit.bayes and logit.bayes
models used by Zelig... which I believe is merely calling MCMCpack.
So one strategy, to which I am fixing to resort, is to call, say,
MCMClogit with verbose set to mcmc (or mcmc divided by an integer)
and then look at my screen.
2008 Jan 20
3
Bugs through R in Mac
Hello,
I recently changed from Win XP to Mac OS X (10.5.1).
Is there a way to run Bugs (in any version) in R (R version 2.6.0
(2007-10-03)) on this platform?
Fredrik
2006 Aug 11
2
about MCMC pack again...
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.
Maybe I am not able to read them very well, by the
2009 Aug 12
1
MCMC sampling question
Hello,
Consider MCMC sampling with metropolis / metropolis hastings proposals
and a density function with a given valid parameter space. How are MCMC
proposals performed if the parameter could be located at the very
extreme of the parameter space, or even 'beyond that' ? Example to
express it and my very nontechnical 'beyond that': The von Mises
distribution is a circular
2007 Jan 30
2
R packages
Hi,
Do any body know which packages of R I need to go for the below topics?
1. Monte Carlo Markov chain (MCMC)
2. Gibbs Sampling
3. Metropolis Hastings
Thanks in advance...
Shubha
[[alternative HTML version deleted]]
2009 Nov 08
3
MCMC gradually slows down
Hello,
I have written a simple Metropolis-Hastings MCMC algorithm for a
binomial parameter:
MHastings = function(n,p0,d){
theta = c()
theta[1] = p0
t =1
while(t<=n){
phi = log(theta[t]/(1-theta[t]))
phisim = phi + rnorm(1,0,d)
thetasim = exp(phisim)/(1+exp(phisim))
r = (thetasim)^4*(1-thetasim)^8/(theta[t]^4*(1-theta[t])^8)
if(runif(1,0,1)<r){
theta[t+1] = thetasim
}
2009 Oct 06
2
R, Coda, and OpenBUGS
Hi All,
I am trying to figure out how to use R-Coda with the output from
OpenBugs. I have installed and loaded the packages BRugs and R2WinBUGS.
I have successfully run a simple Bayes model in WinBUGS using R2WinBUGS'
"bugs" and have used "read.bugs" to build the coda object. I can
successfully switch to OpenBugs and run the same model and get the basic
summary
2007 Jun 06
1
Metropolis-Hastings Markov Chain Monte Carlo in Spatstat
I'm testing some different formulations of pairwise interaction point processes
in Spatstat (version 1.11-6) using R 2.5.0 on a Windows platform and I wish to
simulate them using the Metropolis-Hastings algorithm implemented with Spatstat.
Spatstat utilizes Fortran77 code with the preprocessor RatFor to do the
Metropolis-Hastings MCMC, but the Makefile is more complicated than any I have
2009 Oct 07
1
Which JAGS interface to use?
Frank (or anyone else), can you offer any comments comparing runjags,
R2jags, rjags ?
I couldn't find any vignettes, nothing except a brief mention on Task Views.
Kevin
On Wed, Oct 7, 2009 at 7:48 AM, Frank E Harrell Jr <f.harrell@vanderbilt.edu
> wrote:
> Have you tried the rjags package which uses the jags system? It is much
> more integrated into R and works quite well.
2009 Feb 17
2
How to connect R and WinBUGS/OpenBUGS/LinBUGS in Linux in Feb. 2009
Hi all,
I've managed to get JAGS working on my Ubuntu Hardy Linux with a 32-bit
computer and AMD processors using R 2.8.1. JAGS is great. I've read that
JAGS is the fastest, but that hasn't been my experience. At any rate, I
have more experience with WinBUGS under Windows and would like a version of
that working as well.
It seems like I've read a lot on the subject and tried a
2010 Apr 13
2
Getting Started with Bayesian MCMC
Hi all,
I would like to start to use R's MCMC abilities to compute answers in
Bayesian statistics. I don't have any specific problems in mind yet,
but I would like to be able to compute/sample posterior probabilities
for low-dimensional custom models, as well as handle "standard"
Bayesian cases like linear regression and hierarchical models.
R clearly has a lot of abilities in
2010 May 17
1
BRugs under Linux?
Hello.
In this post:
http://finzi.psych.upenn.edu/Rhelp10/2010-March/233815.html
Uwe Ligges suggests using BRugs rather than R2WinBUGS under windows. He
also notes that it is not in the main CRAN repository, but it is in
"extras" which is a default repository under windows.
I have OpenBUGS 3.1.0 (the latest that has a native Linux version which
is no longer called linBUGS)
2012 Aug 05
1
Possible bug with MCMCpack metropolis sampler
Hi,
I'm having issues with what I believe is a bug in the MCMCpack's
MCMCmetrop1R function. I have code that basically looks like this:
posterior.sampler <- function(data, prior.mu){
log.posterior <- function(theta) log.likelihood(data, theta) +
log.prior(prior.mu, theta)
post.samples <- MCMCmetrop1R(log.posterior, theta.init=prior.mu,
burnin=100, mcmc=1000, thin=40,
2005 Sep 23
4
books about MCMC to use MCMC R packages?
Dear list users,
I need to learn about MCMC methods, and since there are several packages in
R that deal with this subject, I want to use them.
I want to buy a book (or more than one, if necessary) that satisfies the
following requirements:
- it teaches well MCMC methods;
- it is easy to implement numerically the ideas of the book, and notation
and concepts are similar to the corresponding R
2012 Aug 30
2
Which BUGS should one use?
Hello ALL!
Some times ago I started to learn and play with Bayesian stuffs. Many
advice use of WinBUGS for Bayesian inference Using Gibbs Sampler.
However, WinBUGS is discontinued, and now, development is under
OpenBUGS. I wasn't lazy, so I installed both and tried out. In more than
90% of cases they give comparable outcome. But in few cases I got
substantial differences. Recently, I read nice
2016 Mar 15
4
Lógica Bayesiana con R
Hola, buenas a todos:
Me dispongo a empezar un proyecto con logística bayesiana y sé que hay
varios paquetes que puedo utilizar, arm, Bayelogit y MCMCpack. Me
preguntaba si alguien tiene experiencia con éstos paquetes y me pueda
decir cuál de ellos es mejor.
Además de esto quería saber si sabíais alguna bibliografía para
informarme mejor sobre lógica bayesiana, tengo algunas referencias,
2007 Mar 09
1
MCMC logit
Hi,
I have a dataset with the binary outcome Y(0,1) and 4 covariates (X1,X@,X#,X$). I am trying to use MCMClogit to model logistic regression using MCMC. I am getting an error where it doesnt identify the covariates ,although its reading in correctly. The dataset is a sample of actual dataset. Below is my code:
> #######################
>
>
> #retreive data
> # considering four
2011 Aug 15
2
MCMC regress, using runif()
Hello,
just to follow up a question from last week. Here what I've done so far (here an example):
library(MCMCpack)
Y=c(15,14,23,18,19,9,19,13)
X1=c(0.2,0.6,0.45,0.27,0.6,0.14,0.1,0.52)
X2a=c(17,22,21,18,19,25,8,19)
X2b=c(22,22,29,34,19,26,17,22)
X2 <- function()runif(length(X2a), X2a, X2b)
model1 <- MCMCregress(Y~X1+X2())
summary(model1)
but I am not sure if my X2-function is