Displaying 20 results from an estimated 5000 matches similar to: "BUGS"
2008 Jul 23
1
R2WinBUGS problem
Dear friends - I'm on winXP, R 2.71 - I have with some help dveloped
this multivariate normal model, which gives very plausible results in
WinBUGS even without any
initial values specified. However, when I then try to run the same model
via the bugs function in R2WinBUGS with inits specified as inits=NULL
the program stops in a dead end. So I have tried to make inits for the
bugs function
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
2009 Dec 03
2
Help R2WinBUGS
Hello,
I have problem running WinBUGS from R.
The following example works in WinBUGS but it does not work in R through
package R2WinBUGS.
Does anyone know what the problem is?
x <- c(0.2, 1.1, 1, 2.2, 2.5, 2.9, 2.9, 3.6, 3.8, 0.6, 1, 2, 2.4, 2.6, 2.8,
3.2, 3.9, 3.5)
y <- c(0.5, 1.3, 0.1, 0.7, -0.4, 0.5, -0.9, -0.3, -0.3, 0.6, 0.4, 0.9, -0.1,
-0.4, -0.5, -0.2, 0.3, -1.5)
eco <- c(1, 3,
2006 Apr 27
1
State space AR models in R: some examples
Hi all,
Does anyone have an example of an autoregressive (AR) time-series model
specified as a state space model in R? That is, I want to go beyond the
locally linear (constant) model, and fit the following Gaussian AR state
process model:
Xt = a + (1+b)*Xt-1 + epsilon
,where the model for the observation process is
Yt = Xt + tau
I have information of the tau's (observation variance)
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 Oct 15
1
Problem using BRugs
Hi R users,
I am trying to call openbugs from R. And I got the following error message:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
model is syntactically correct
expected the collection operator c error pos 8 (error on line 1)
variable ww is not defined in model or in data set
[1] "C:\\DOCUME~1\\maomao\\LOCALS~1\\Temp\\RtmpqJk9R3/inits1.txt"
2008 Sep 17
1
A Simple Question
Hi:
I am trying to run your SCHOOLS example as following and I get an error message stated that : Error: could not find function "bugs"
Would you please help me since I would like to run some WINBUG programs from your R by reading external data and I am new to R?
Do I missing some function? Should I install some extra files?
Thanks a lot in advance for your help!!
> schools
2012 Oct 26
1
Openbugs- Array Index
Hi,
I'm working on the codes below however every time I run them when they get
to OpenBUGS I keep getting the error message: array index is greater than
array upper bound for hab.
Any help would be greatly appreciated,
Suzie
Codes:
ungulate <- read.csv(file.choose ()) #ungulate
ungulate <-
as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL
2006 Apr 29
3
Making R talk to Win/OpenBUGS in Linux (again)
I'm back!
I've just learned that, on a fully updated Fedora Core Linux5 sytem,
the working solution to access Winbugs under wine via the R package
"rbugs" no longer works. Here was my last post on this topic (with
the formerly working solution) from January.
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/68497.html
Currently, what happens is that WinBUGS starts up, but just
2008 Dec 15
3
R2winbugs : vectorization
I'm new to bugs, so please bear with me. Can someone tell me if the
following two models are doing the same thing? The reason I ask is
that with the same data, the first (based on 4 separate coeffs
a1--a4) takes about 50 secs, while the second (based on a vectorized
form, a[]) takes about 300. The means are about the same, though
R-hat's in the second version are quite a bit better.
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
2007 May 14
1
Hierarchical models in R
Is there a way to do hierarchical (bayesian) logistic regression in R, the
way we do it in BUGS? For example in BUGS we can have this model:
model
{for(i in 1:N) {
y[i] ~ dbin(p[i],n[i])
logit(p[i]) <- beta0+beta1*x1[i]+beta2*x2[i]+beta3*x3[i]
}
sd ~ dunif(0,10)
tau <- pow(sd, -2)
beta0 ~ dnorm(0,0.1)
beta1 ~ dnorm(0,tau)
beta2 ~ dnorm(0,tau)
beta3 ~
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)#
2011 May 27
1
Error with BRugs 0.53 and 0.71, on Win7 with R 2.12.2 and 2.13.0 (crashes R GUI)
I've run into persistent problems with OpenBUGS crashing when using BRugs .53 and .71, and am hoping someone has suggestions. There is obviously something unusual going on in my environment, but I'm at a loss as to where to begin to try to solve it.
In a nutshell, what happens is that, as soon as I call "modelCheck()" in BRugs, it gets an error or crashes ... but only some of
2006 Apr 05
2
R2WinBUGS error
Dear R-help,
I'm using the R2WinBUGS package and getting an error message:
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file 'codaIndex.txt', reason 'No such file or
directory'
I'm using R 2.2.1 and WinBUGS 1.4.1 on a windows machine (XP). My R code
and WinBUGS code is given below.
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.
2008 Dec 09
1
expected variable name error pos 98349 WInBUGS in R
> I am using a random intercept model with SITEID as random and NAUSEA as
> outcome.
>
> I tried using a dataset without missing values and changed my model
> statement accordingly but still get the same error. Follwoing in an excerpt.
> > anal.data <- read.table("nausea.txt", header=T, sep="\t")
> > list(names(anal.data))
> [[1]]
> [1]
2008 Dec 07
1
Reading txt file in R
Hi:
I am using the following code to read a data set in txt in R and using the follwoing model. But it seems to give me an error ' expected variable name error pos 134022'. Any help is greatly appreciated.
Code:
anal.data <- read.table("nausea.txt", header=T, sep="\t")
list(names(anal.data))
attach(anal.data)
n.samples <- dim(anal.data) [1] # number of data
2010 Aug 10
0
Error in R2Bugs
Hello,
I am running a GLMM using R2Bugs, but am getting the below error message. I am including the entire output, although the 2nd and 3rd lines seem to indicate the problem. Note that I do define N (it is an integer) and send it to a datalist (see the R commands and model below). Interestingly, when I put all of this into OpenBugs directly, the model runs. I do have reasons, however, that I
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