similar to: MCMC sampling question

Displaying 20 results from an estimated 4000 matches similar to: "MCMC sampling question"

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 }
2005 Oct 28
1
MCMC in R
Dear R-helpers, Hi! All. I'm doing a project which needs MCMC simulation. I wonder whether there exists related packages in R. The only one I know is a MCMCpack package. What I want to do is implementing gibbs sampling and Metropolis-Hastings Algorithm to get the posterior of hierarchical bayesian models. Thanks in advance. Jun
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]]
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
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.
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
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
2005 Jul 26
1
Wishart Density
Dear R users, I am doing MCMC using Metropolis-Hastings. My model is bivariate-log-normal and the prior for variance-covariance is wishart distribution. I am wondering if there are some simple codes about how to get the density of Wishart distribution in my case ? Thanks in advance. Meihua [[alternative HTML version deleted]]
2000 Mar 16
3
MCMC
Hi Does anyone know of any R coding/functions for MCMC approaches? I am currently using BUGS but I wonder if the bazaar has produced anything? I think I am pushing BUGS to it's limit and possibly past it at the moment. John -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to do this weekend to understand every bit but your code will prove very useful. Cheers, Aziz -----Original Message----- From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be] Sent: May 12, 2006 4:35 PM To: Chaouch, Aziz Subject: RE: [R] Maximum likelihood estimate of bivariate
2006 May 11
2
Maximum likelihood estimate of bivariate vonmises-weibull distribution
Hi, I'm dealing with wind data and I'd like to model their distribution in order to simulate data to fill-in missing values. Wind direction are typically following a vonmises distribution and wind speeds follow a weibull distribution. I'd like to build a joint distribution of directions and speeds as a VonMises-Weibull bivariate distribution. First is this a stupid question? I'm
2007 Mar 02
1
Help with faster optimization for large parameter problem
Hello all, I have a large parameter problem with the following very simple likelihood function: fn<-function(param) { x1<-param[1:n] g1<-param[(n+1):(2*n)] beta<-param[(2*n+1):(2*n+k)] sigma2<-param[2*n+k+1]^2 meang1sp<-mean(g1[sp]) mu<-beta%*%matrix(x1,1,n)-(g1[sp]-meang1sp)%*%matrix(g1,1,n) return(sum((ydc-mu)^2)/(2*sigma2) + n*k*log(sqrt(sigma2)) +
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?)?
2007 Jul 13
2
Question about acception rejection sampling - NOT R question
This is not related to R but I was hoping that someone could help me. I am reading the "Understanding the Metropolis Hastings Algorithm" paper from the American Statistician by Chip and Greenberg, 1995, Vol 49, No 4. Right at the beginning they explain the algorithm for basic acceptance rejection sampling in which you want to simulate a density from f(x) but it's not easy and you
2012 Nov 30
1
Example metropolis hasting
Hello all, could you tell where is an example of metropolis hasting? Thank you! Tania Sent from my iPod
2007 Feb 17
0
MCMC Pack Crashes R-GUI session (PR#9516)
Full_Name: Lloyd Lubet Version: 2.4.1rc OS: XP Submission from: (NULL) (65.19.17.17) Dear Andrew, I am trying to learn gibbs sampling and Metropolis. When I run your gibbs version of multiple linear regression my session crashes. I have trimmed the dataframe and set my object.size = 1 gigB. Despite my best efforts it still crashes while advising me to contact the MCMC Pack developement team.
2009 Mar 03
1
spatial markov chain methods
Hello, can any one point me to R-packages (if available) which include spatial Markov Chain methods? My second question is more general but hopefully not OT: Currently we are using the software TPROGS, which let people simulate property distributions in space by some Markov Chain approaches. We face some problems due to the lack of information between distances of samples along borehole path
2006 Aug 08
1
fixed effects constant in mcmcsamp
I'm fitting a GLMM to some questionnaire data. The structure is J individuals, nested within I areas, all of whom answer the same K (ordinal) questions. The model I'm using is based on so-called continuation ratios, so that it can be fitted using the lme4 package. The lmer function fits the model just fine, but using mcmcsamp to judge the variability of the parameter estimates produces
2013 Jan 17
2
How to delete repeated values in MCMC sampling and get index of unique values?
Dear list, How do you delete repeated samples? In MCMC, when your candidate value has been reject, so you remain on the same point, so you keep that value. Say I have this toy example, > c(1,6,6,6,3,5,4,4,2,3,5) The 6 and 4 are repeated, I only want the index of the non-repeated values. I thought of using which() and unique(), but that does not give you the index of the unique values.
2003 Mar 31
2
Does R have an inverse wishart distribution?
If so, I''ve had trouble finding it. Can anyone help?