Displaying 20 results from an estimated 5000 matches similar to: "Question about R graphs"
2011 Feb 24
2
MCMCpack combining chains
Deal all, as MCMClogit does not allow for the specification of several chains, I have run my model 3 times with different random number seeds and differently dispersed multivariate normal priors.
For example:
res1 = MCMClogit(y~x,b0=0,B0=0.001,data=mydat, burnin=500, mcmc=5500, seed=1234, thin=5)
res2 = MCMClogit(y~x,b0=1,B0=0.01,data=mydat, burnin=500, mcmc=5500, seed=5678, thin=5)
res3 =
2011 Mar 17
0
Gelman-Rubin convergence diagnostics via coda package
Dear,
I'm trying to run diagnostics on MCMC analysis (fitting a log-linear
model to rates data). I'm getting an error message when trying
Gelman-Rubin shrink factor plot:
>gelman.plot(out)
Error in chol.default(W) :
the leading minor of order 2 is not positive definite
I take it that somewhere, somehow a matrix is singular, but how can
that be remedied?
My code:
library(rjags)
2013 Mar 28
3
problem with plots with short example.
i am having problem running my own data. yesterday it was working just fine. today it is not. this is the code i was using as an example to follow. this code ALSO worked just fine yesterday, and is no longer working at all. i suspect it is a problem with either my computer or the software, at this point. if THIS won't even run.... something is wrong.
i can assure you this isn't
2010 Jun 23
1
A question about R2Winbugs
Dear R users:
I was trying to fit a HMM with mixture of Gaussian into the dataset, and I
tried to implement it by R2Winbugs. But I got the following errer.
*
Error in FUN(X[[1L]], ...) :
.C(..): 'type' must be "real" for this format*
Does anybody know what's the problem? Does R2Winbugs accept some matrix as
inits? I would really appreciate your help. Thank you very much.
2005 Jan 25
1
CODA vs. BOA discrepancy
Dear List:
the CODA and BOA packages for the analysis of MCMC output yield different
results on two dignostic test of convergence: 1) Geweke's convergence
diagnostic; 2) Heidelberger and Welch's convergence diagnostic. Does that
imply that the CODA and BOA packages implement different ``flavors'' of
the same test?
I paste below an example.
Geweke's test
2012 Oct 03
0
calculating gelman diagnostic for mice object
I am using -mice- for multiple imputation and would like to use the gelman
diagnostic in -coda- to assess the convergence of my imputations. However,
gelman.diag requires an mcmc list as input. van Buuren and
Groothuis-Oudshoorn (2011) recommend running mice step-by-step to assess
convergence (e.g. imp2 <- mice.mids(imp1, maxit = 3, print = FALSE) ) but
this creates mids objects. How can I
A log on Bayesian statistics, stochastic cost frontier, montecarl o markov chains, bayesian P-values
2004 Feb 17
0
A log on Bayesian statistics, stochastic cost frontier, montecarl o markov chains, bayesian P-values
Dear friends,
Over the past weeks, I have been asking a lot of questions about how to
use R in Bayesian analysis. I am brand new to R, but I am very pleased with
it. I started with winbugs but I found winbugs to be a limited software, not
bad but has several limitations. By contrast, R allows the analyst to tackle
any problem with a huge set of tools for any kind of analysis. I love R. In
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 16
1
Error with r2winbugs
Hi,
I am trying to do run the following model saved in "C:/bugs/sus.bug"
model {
for (i in 1:n){
y[i] ~ dpois(lamdba[i])
log(lambda[i]) <- mu+bmale[male[i]]+bschn[schn[i]]+epsilon[i] #
epsilon[i] ~ dnorm(0,tau.epsilon)
}
mu ~ dnorm(0,.0001)
bmale ~ dnorm(0,.0001)
tau.epsilon <- pow(sigma.epsilon, -2)
sigma.epsilon ~ dunif(0,100)
for (j in
2004 Apr 19
0
New package: mcgibbsit, an MCMC run length diagnostic
Package: mcgibbsit
Title: Warnes and Raftery's MCGibbsit MCMC diagnostic
Version: 1.0
Author: Gregory R. Warnes <gregory_r_warnes at groton.pfizer.com>
Description:
mcgibbsit provides an implementation of Warnes & Raftery's MCGibbsit
run-length diagnostic for a set of (not-necessarily independent) MCMC
sampers. It combines the estimate error-bounding approach of Raftery
2004 Apr 19
0
New package: mcgibbsit, an MCMC run length diagnostic
Package: mcgibbsit
Title: Warnes and Raftery's MCGibbsit MCMC diagnostic
Version: 1.0
Author: Gregory R. Warnes <gregory_r_warnes at groton.pfizer.com>
Description:
mcgibbsit provides an implementation of Warnes & Raftery's MCGibbsit
run-length diagnostic for a set of (not-necessarily independent) MCMC
sampers. It combines the estimate error-bounding approach of Raftery
2006 Dec 09
1
WinBUGS14 and R
I'm trying to call BUGS from R. But it's not working. R freezes up and
BUGS gives me a strange output in the log. Just to know, BUGS is
registered. The modified date on the keys file is today (Dec. 9th). It
should be fully registered so that I can use it fully. And, the BUGS model
is syntactically correct. Any suggestions would be very helpful.
Here is my BUGS model:
model {
2010 Mar 16
0
Fw: an ordinal regression MCMC run high correlation
I tried thinning of the mcmc run with 500,000 iteration. It looks like 100 or 200 is enough to remove the autocorrelation of a1 and tau.
Is that too much thining?
--- On Tue, 3/16/10, ping chen <chen1984612 at yahoo.com.cn> wrote:
> From: ping chen <chen1984612 at yahoo.com.cn>
> Subject: an ordinal regression MCMC run high correlation
> To: r-help at r-project.org
>
2012 Dec 04
1
Winbugs from R
Hi,
I am trying to covert a Winbugs code into R code. Here is the winbugs code
model{# model’s likelihoodfor (i in 1:n){time[i] ~ dnorm( mu[i], tau ) # stochastic componenent# link and linear predictormu[i] <- beta0 + beta1 * cases[i] + beta2 * distance[i]}# prior distributionstau ~ dgamma( 0.01, 0.01 )beta0 ~ dnorm( 0.0, 1.0E-4)beta1 ~ dnorm( 0.0, 1.0E-4)beta2 ~ dnorm( 0.0, 1.0E-4)#
2008 Dec 20
2
Problems installing lme4 on Ubuntu
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
While I'm not an R expert, I have used R on Windows XP. Now I've moved
to Ubuntu (Intrepid), and I'm trying to configure R to work with the
Gelman and Hill _Data Analysis Using Regression and
Multilevel/Hierarchical Models_. So far, it's not working.
I start by following the instructions for installing arm and BRugs at
2004 Feb 11
0
gelman.diag question
Dear Friends,
I am trying to use the gelman-rubin convergence test. I generated a matrix
samp[10,000x86] with the gibbs sampler. the test requires the creation of
"mcmc" objects. Since I don't know how to define samp as a "mcmc" object, I
tried to create one mcmc object by means of the mcmc() function. With this
function I tried to create a mcmc object dul from samp but I
2003 Apr 18
1
MCMCpack gelman.plot and gelman.diag
Hi,
A question. When I run gelman.diag and gelman.plot
with mcmc lists obtained from MCMCregress, the results are following.
> post.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000,
+ thin = 10, verbose = FALSE, beta.start = NA, sigma2.start = NA,
+ b0 = 0, B0 = 0, nu = 0.001, delta = 0.001)
> post1.R <- MCMCregress(Size~Age+Status, data
2006 Jun 20
1
Bayesian logistic regression?
Hi all.
Are there any R functions around that do quick logistic regression with
a Gaussian prior distribution on the coefficients? I just want
posterior mode, not MCMC. (I'm using it as a step within an iterative
imputation algorithm.) This isn't hard to do: each step of a glm
iteration simply linearizes the derivative of the log-likelihood, and,
at this point, essentially no
2010 Mar 16
0
an ordinal regression MCMC run high correlation
I am trying to model a clusterd ordinal response data (either 1, 2 or 3) called , the correponding physician of the patient is also in the data.
Since it is ordinal, I used the ordinal logit model
topbox[i]~discrete with probability P[j,1],p[j,2], p[j,3], j is the corresponding physician of the ith patient
C[j] is the physician effect , a1 and a1+theta is the common cutpoints for all
2011 Oct 24
0
Output from BRugs Doesn't Match That from OpenBUGS
Hi.
I am trying to analyze with BRugs the Box-Tiao variance components example
in WinBUGS. The output from BRugs,
mean sd MC_error val2.5pc median val97.5pc start sample
sigma2.btw 681.9 1161 10.89 0.7016 253.8 4232 25001 100000
sigma2.with 4266.0 1246 4.92 2480.0000 4057.0 7262 25001 100000
doesn't match the output from WinBUGS,
node mean