Displaying 20 results from an estimated 30000 matches similar to: "How to delete repeated values in MCMC sampling and get index of unique values?"
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 Feb 13
1
lme4/lmer: P-Values from mcmc samples or chi2-tests?
Dear R users,
I have now tried out several options of obtaining p-values for
(quasi)poisson lmer models, including Markov-chain Monte Carlo sampling
and single-term deletions with subsequent chi-square tests (although I
am aware that the latter may be problematic).
However, I encountered several problems that can be classified as
(1) the quasipoisson lmer model does not give p-values when
2010 Sep 29
1
sample exponential r.v. by MCMC
Dear R users,
I am leaning MCMC sampling, and have a problem while trying to sample
exponential r.v.'s via the following code:
samp <- MCMCmetrop1R(dexp, theta.init=1, rate=2,
mcmc=5000, burnin=500,
thin=10, verbose=500, logfun=FALSE)
I tried other distribtions such as Normal, Gamma with shape>1, it works
perfectly fine. Can someon
2011 Jan 19
2
MCMC object indexing
I have an mcmc object and I''m trying to plot the quantiles of the variables - and not as a function of the iterations as in cumuplot.
I cannot seem to find the right combination of indexing to access the variables; after which I''m sure I can plot all the statistics I could hope for.
Any hints for accessing the mcmc object would be appreciated.
=Dave
[[alternative HTML
2011 Jun 17
2
Using MCMC sampling to estimate p values with a mixed model
Hi everyone,
Apologies if this is a silly question but I am a student and this is my
first time using R so I am still trying to educate myself on commands,
models e.t.c
I have a mixed model with four dichotomous fixed factors and subject as a
random factor (as each person completed four vignettes, with factors crossed
across vignettes).
I have run an lmer model and used the Monte Carlo method
2010 May 20
1
Geneland error on unix: Error in MCMC(........ :, unused argument(s) (ploidy = 2, genotypes = geno)
I am receiving the above error ( full r session output below) the
script runs OK in windows. and "genotypes" and "ploidy" are both
correct arguments
any suggestions would be most welcome
Nevil Amos
MERG/ACB
Monash University School of Biological Sciences
> library(Geneland)
Loading required package: RandomFields
Loading required package: fields
Loading required
2010 Apr 21
1
A question about plot.mcmc
Dear List members,
I am using R to generate MCMC time series plots.
This is the code I use; however, everytime an error message will come out
saying could not find function "plot.mcmc."
I have coda package and Lattice package installed.
Does anyone know what may get wrong here? Thanks so much for your
suggestions.
Hongli Li
*library (coda)
dat1=read.csv("Itemtime.csv")
2004 Feb 12
1
How do you create a "MCMC" object?
I have been running a Gibbs Sampler to estimate levels of efficiency in the
Louisiana Shrimp Industry. I created a matrix (samp) where I stored the
results of each iteration for 86 variables. I run 10,000 iterations. So, the
matrix samp is 10,000 x 86. I want to use the gelman-rubin test to check for
convergence. To do that, I need at least two chains. If I run second chain
with different starting
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
2006 May 11
1
about MCMC pack
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,
2018 Jan 18
0
MCMC Estimation for Four Parametric Logistic (4PL) Item Response Model
I know of no existing functions for estimating the parameters of this model using MCMC or MML. Many years ago, I wrote code to estimate this model using marginal maximum likelihood. I wrote this based on the using nlminb and gauss-hermite quadrature points from statmod.
I could not find that code to share with you, but I do have code for estimating the 3PL in this way and you could modify the
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
2018 Jan 18
2
MCMC Estimation for Four Parametric Logistic (4PL) Item Response Model
Good day Sir/Ma'am! This is Alyssa Fatmah S. Mastura taking up Master of
Science in Statistics at Mindanao State University-Iligan Institute
Technology (MSU-IIT), Philippines. I am currently working on my master's
thesis titled "Comparing the Three Estimation Methods for the Four
Parametric Logistic (4PL) Item Response Model". While I am looking for a
package about Markov chain
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
2010 Apr 26
2
Unexpected warnings from summary() on mcmc.list objects
I am trying to get summary statistics from WinBUGS/JAGS output in the
form of mcmc.list objects, using the summary() function. However, I
get odd warning messages:
Warning messages:
1: In glm.fit(x = X, y = Y, weights = weights, start = start, etastart
= etastart, :
algorithm did not converge
2: In glm.fit(x = X, y = Y, weights = weights, start = start, etastart
= etastart, :
algorithm did
2012 Dec 13
1
An important question about running MCMC
Dear officer
I have a question concerning running R when I am doing my research. Can you
help me to figure that out?
I am now running a MCMC iteration in the R program. But it is always
stucked in some loop. This cause big problems for my research. So I want to
know whether we can skip the current dataset and move to next simulated
data when the iteration is stucked? Alternatively, can the MCMC
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
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
2012 Dec 13
4
Running MCMC in R
Dear all
I am now running a MCMC iteration in the R program. But it is always
stucked in some loop. This cause big problems for my research. So I want to
know whether we can skip the current dataset and move to next simulated
data when the iteration is stucked? Alternatively, can the MCMC chain skip
the current iteration when it is stucked and automatically to start another
chain with different
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
}