Displaying 20 results from an estimated 97 matches for "burnin".
Did you mean:
burning
2011 Jun 05
1
conditions simpler way
Dear All,
I have a MCMC result in x1. I was wondering if there is a simpler, more
elegant way of evaluating the estimate of an integral then this (I am
pretty sure there is):
Also if I want to count the x's say -1<x<2 but not the ones in the burn
in period.
[code]
z <- -2
burnin <- 2000
int1 <-
length(x1$x[(burnin+1):length(x1$x)][x1$x[(burnin+1):length(x1$x)]<z])/(length(x1$x)-burnin)
[\code]
Thank you:
Daniel
2010 May 20
1
Geneland error on unix: Error in MCMC(........ :, unused argument(s) (ploidy = 2, genotypes = geno)
...{
+ path.sp<- paste(theWd,sp,"/",sep="")
+ dir.create(path.sp)
+ GENO.TABLE<-paste(theWd,sp,"geno",sep="")
+ XY.TABLE<-paste(theWd,sp,"xy",sep="")
+ MINPOP=1
+ MAXPOP=25
+ INITPOP=1
+ NITS=500000
+ THIN=NITS/1000
+ nrun <- 10
+ burnin <- 200
+ geno<-noquote(read.table(GENO.TABLE))
+ coord<-read.table(XY.TABLE)
+
+ ## Loop for multiple runs
+
+ for(irun in 1:nrun)
+ {
+ ## define path to MCMC directory
+
+ path.mcmc <- paste(path.sp,irun,"/",sep="")
+ dir.create(path.mcmc)
+ MCMC(coordinates=coord,...
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 = MCMClogit(y~x,b0=5,B0=0.0001,data=mydat, burnin=500, mcmc=5500, seed=91011, thin=5)
Each result produces an object of class mcmc.
In order to use the Gelman-Rubin diagn...
2004 Nov 19
2
Plotting averages of y per x
...plot average of y instead of all y values, since one can easily
see the trend if there is to many points and/or x might be like 1, 2, 3,
4, 5, ... and you might get a cloud (which can also be informative)
and/or columns of points.
Anyway, learning with R i get stucked. I have the data in table
burnins1, with the following names:
names(burnins1)
[1] "Model" "Replication" "h2" "burnin"
and some data
...
...
380 New 80 2 23
381 New 81 5 38
382 New 82 10 31
383 New 83 15 98
384...
2005 Nov 09
2
About: Error in FUN(X[[1]], ...) : symbol print-name too long
...53,50,49,51,47,53,50,49,55,53,48,54,46),
y=c(50,49,57,52,47,52,58,45,55,54,51,54,56,53,52,47,51,54,50,47,46,44,54,55,52,57,52,48,48,51))
dat <- format4Bugs(dat, digits = 0)
parm <- c("lbda")
bugs(dat, inits=list(NULL), parm, "d2.bug",
n.chains = 1, n.iter = 5000, n.burnin = floor(n.iter/2),
n.thin = max(1, floor(n.chains * (n.iter - n.burnin)/1000)),
bin = (n.iter - n.burnin) / n.thin,
debug = TRUE, DIC = TRUE, digits = 5, codaPkg = FALSE,
bugs.directory = "C:/WinBUGS14/",
working.directory = NULL, clearWD = FALSE)
The objective of the program is t...
2008 Aug 22
2
WinBUGS with R
...its.beta0 <- 0
inits <- function(){list(beta=inits.beta,beta0=inits.beta0,taueps=1.0E-3)}
parameters <- list("sigma","beta","beta0","y.star")
fitm <- bugs(data,inits,parameters,model.file="model.bug",
n.chains=3, n.iter=n.iter, n.burnin=n.burnin, n.thin = n.thin,
debug=FALSE,DIC=FALSE,digit=5,codaPkg=FALSE,
bugs.directory="C:/Program Files/WinBUGS14/")
but I always get the following error:
Error in FUN(X[[1L]], ...) :
.C(..): 'type' must be "real" for this format
I tried the web, but f...
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 = data, burnin = 5000, mcmc = 100000,
+ thin = 10, verbose = FALSE, beta.start = -3, si...
2005 Jul 13
1
problems with MNP
...ackage for Fitting the Multinomial Probit Models
Version: 1.3-1
URL: http://www.princeton.edu/~kimai/research/MNP.html
>
> res1 <- mnp(PREVOTE3 ~ 1, choiceX = list(1=UCLC, 2=UDLC, 3=UPLC),
Error: syntax error
> cXnames = "ut", data = small, n.draws = 500, burnin =
100,
Error: syntax error
> verbose = TRUE)
Error: syntax error
>
> # another try giving arbitrary names to the values of the dependent
variable
>
> res1 <- mnp(PREVOTE3 ~ 1, choiceX = list(Clinton=UCLC, Dole=UDLC,
Perot=UPLC),
+ cXnames = &...
2007 Apr 29
0
Going from Coda Files to R2WinBUGS
...I am somewhat unclear as to why this is so.
The code for the method is as follows. Any thoughts would be greatly
appreciated, and if this works out, feel free to use it yourself!
Could be quite useful!
-Jarrett
#note, the test run was something along the lines of c.bugs<-coda2bugs
(n.burnin=1000)
coda2bugs<-function(codafile="jags.out", indexfile="jags.ind",
n.chains=1,
n.iter=NA, n.burnin=NA, n.thin=1, DIC=FALSE, file.rm=T, ...){
require(R2WinBUGS)
#first, split up the coda file for R2WinBUGS
codaSplit(codafile, indexfile)
#get the param...
2007 Mar 09
1
MCMC logit
...Support provided by the U.S. National Science Foundation
## (Grants SES-0350646 and SES-0350613)
##
[1] TRUE
Warning message:
package 'MASS' was built under R version 2.4.1
> a0 = 0.5
> b0 = 1
> mu0 = 0
> beta.init=list(c(0, rep(0.1,4)), c(0, rep(-0.1,4)), c(0, rep(0, 4)))
> burnin.cycles = 1000
> mcmc.cycles = 25000
> # three chains
> post.list <- lapply(beta.init, function(vec)
+ {
+ posterior <- MCMClogit(y~x1+x2+x3+x4, data=c.df, burnin=burnin.cycles, mcmc=mcmc.cycles,
+ thin=5, tune=0.5, beta.start=vec, user.prior.density=logpriorfun, logfun=TRUE,
+ mu=mu0...
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,
store.ability=FALSE, drop.constant.items=TRUE)
where Y is a matrix subjects x items (1500 x 32) of simulated response
sequences.
After running the program, if I ask for a plot or...
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 tell me why?
Thank you for your help.
Best,
Zhongyi
[[alternative HTML version deleted]]
2010 Sep 07
1
problems with siar package
...segfault ***
address 0xb31941cc, cause 'memory not mapped'
Traceback:
1: .C("siarmcmcv4", as.integer(numdata), as.integer(numsources),
as.integer(numiso), as.integer(numgroups), as.integer(startgroup),
as.integer(endgroup), as.integer(siardata$iterations),
as.integer(siardata$burnin), as.integer(siardata$howmany),
as.integer(siardata$thinby), as.double(prior), as.data.frame(data2),
as.data.frame(concdepdata), as.data.frame(sourcedata),
as.data.frame(correctionsdata), as.data.frame(parameters))
2: siarmcmcdirichletv4(target, source, fraction, iterations = 5e+05, burnin
= 1e+05...
2012 Feb 01
1
problem working directory WinBUGS using R
Hi,
I am trying to use WinBUGS using R, but i am having some problems using
bugs function:
out <- bugs(data = win.data, inits = inits, parameters.to.save = params,
model.file = "model.txt",
n.thin = nt, n.chains = nc, n.burnin = nb, n.iter = ni, debug = TRUE, DIC =
TRUE, working.directory = getwd())
ls()
WinBUGS file is in working directory=D:/Line/documents but R looks for
winBugs at C:/Program Files/WinBUGS14/.
I already had changed the working directory for D:/Line/documents using
setwd () function and it still a...
2010 Sep 09
1
R2WinBugs problem
...ning R2WinBugs on a setup that previously
worked for me (Dell Laptop, Windows XP service pack 3, R 2.11.1, WinBugs
1.43) . When I issue the following command
smds.sim <- bugs (data, inits, parameters, "SMDSbrandLoc2.bug",
debug = T,
n.thin = n.thin,
n.chains = n.chains,
n.burnin = n.burnin,
n.iter = n.iter)
I get the following error in R
Error in while (.regexpr("\r", info) > 0) { : argument is of length zero
Also in WinBugs I get the following messages
dic.set()
command #Bugs:dic.set cannot be executed (is greyed out)
update(5)
coda(*,C:...
2013 Mar 28
3
problem with plots with short example.
...###################################
### code chunk number 3: exchange
###################################################
exchange.mod <- "model{
for(i in 1:N){
y[i] ~ dnorm(mu, tau)
}
mu ~ dnorm(0,.001)
tau ~ dgamma(.1,.1)
}"
exchange.out <- run.jags(exchange.mod,
data=dat, burnin=10000, sample=50000,
thin=5, monitor=c("mu", "tau"),
monitor.deviance=T, monitor.pd=T,
silent.jags=T)
###################################################
### code chunk number 4: exchange
###################################################
FE.mod <- "model{
for...
2008 Jun 18
1
Error in bugs.run -- R2WinBUGS
Hi,
I tried to use MethComp library and this library make use of the WinBUGS
by R2WinBuGUS,
but I get the follow error in bugs.run:
*Error in bugs.run(n.burnin, bugs.directory, WINE = WINE, useWINE =
useWINE, : *
Look at the log file and
try again with 'debug=TRUE' to figure out what went wrong within Bugs.
Anyone can help-me, please?
Thanks
Cleber
library( MethComp )
library( R2WinBUGS )
library( Epi )
# source("c:/stat/r/bxc/librar...
2012 Jan 24
2
Null models of species co-occurrence
...e of
the methods appear to be the ones that I want. The methods listed are r0,
r1, r2, r2dtable, swap, tswap. However, I want to know how to go about
implementing fixed row algorithms, as suggested in Gotelli 2000 in Ecology.
Also, the null models created seem to be incredibly dependent on the 1)
burnin and 2) thin values. These are the 1) Number of null communities
discarded before proper analysis in sequential methods "swap" and "tswap"
and 2) Number of discarded null communities between two evaluations of
nestedness statistic in sequential methods "swap" and "...
2007 Mar 07
1
Failure to run mcsamp() in package arm
...I(baRatio - 0.985) 2.57 0.45
delta 0.22 -0.12 -0.94
Residual 0.39
number of obs: 494, groups: subject, 13
deviance = 551.4
> e7.sim <- mcsamp(e7.lmer2)
Error in as.bugs.array(sims, program = "lmer", n.iter = n.iter,
n.burnin = n.burnin, :
error in parameter sigma. in parameters.to.save
****************************************
I would appreciate a pointer to what the problem might be.
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Char...
2008 Sep 19
0
problems with too many NA in the function ideal() from pscl package.
Hi all,
I'm trying to run some monte carlo simulation for my roll call data
using the ideal() function, which resides in the pscl package.
However, I'm receiving an error message that I don't understand.
Error in ideal(a, maxiter = 1000, thin = 10, burnin = 50, store.item = TRUE, :
NA/NaN/Inf in foreign function call (arg 13)
my code is simple the following:
> m_a <- ideal(a, maxiter = 1000, thin = 10, burnin = 50,
+ store.item = TRUE, normalize=T,
+ priors=list(xp=1e-12,xpv=1e-12,bp=1e-12,bpv=1e-12), verbose=T)
ideal: analys...