similar to: R2OpenBUGS quesion

Displaying 20 results from an estimated 120 matches similar to: "R2OpenBUGS quesion"

2011 Oct 20
1
Are they fully identical: WinBUGS and OpenBUGS; R2WinBUGS and R2OpenBUGS
Hello ALL! I am running Linux, Fedora 15 64-bits, and R on it. I need to use WinBUGS and R2WinBUGS, but as far as I read, WinBUGS is closed project, to be continued with/as OpenBUGS. Thus, I have found R2OpenBUGS on OpenBUGS Contributed Code (http://openbugs.info/w/UserContributedCode), not on CRAN. Author(s) states that it is equivalent for R2WinBUGS. I tried briefly, and realized few minor
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
2013 Jan 06
0
How to use predict function from R2OpenBUGS results
Dear All,   I made some headways on my ODE problem in R2OpenBUGS, but got stuck again. Wonder if someone could help on the following:   I am running the following code:   library(R2OpenBUGS) dosetotal <-c(500,250) z <-c(4,2) grid <-c(4,15) n.grid <-2 tol <-0.001 dim <-2 T <-2 origin <-0 dosetime <-c("1/05/2013 0:00","1/06/2013 00:00") dose
2011 Sep 05
3
cannot find system32 error
I installed wine 1.2.3 on Mac OS X 10.6.8 with the hopes of getting OpenBUGs running, but no success. It seems like OpenBUGs installs properly, but when I try to open it, I get the following: wine: cannot find L"C:\\windows\\system32\\OpenBUGS.exe What does this mean/how can I fix it?
2013 Jan 03
1
R2OpenBUGS question with differential equations
Dear All,   Currently I am running the following code:   library(stats4) library(odesolve) library(rgenoud) Input<-data.frame(SUB=c(1),time=c(0.5,3,10,15),lev=c(2.05,12.08,9.02,8)) XD<-500 IT<-3 diffeqfun<-function(time, y, parms) {   if(time<=IT)      dCpdt <- (XD/IT)/parms["Vol"] -
2013 Feb 18
1
compare posterior samples from R2OpenBugs and R function bugs{R2WinBUGS}
Hi all, I used both OpenBugs and R function bugs{R2WinBUGS} to run a linear mixed effects model based on the same data set and initial values. I got the same summary statistics but different posterior samples. However, if I order these two sets of samples, one is generated from OpenBugs and the other is generated from R, they turn to be the same. And the samples from R do not have any
2011 May 03
1
Rodbc quesion: how to reliably determine the data type?
Hello, How can I tell RODBC to scan all the records of an xls file to determine the data type? If the first n records happen to be empty Rodbc assumes a character, and any numbers are made <NA>. And if, for instance, the first n records contain numbers, and later they also contain characters, those characters become NA. Cheers!! Albert-Jan
2013 Feb 25
1
quesion about SS of ANOVA
Hi all: I have a quesion about ANOVA: Is SS(Sum of Square) of a specific factor constant with the number of factors changing? dat1 includes one factor g1,and g1's SS is called SS_g1_dat1. dat2 includes two factors g1,g2,and g1's SS is called SS_g1_dat2. My quesion is: Is SS_g1_dat1 equals to SS_g1_dat2? I have both "yes" and "no" reasons for the quesion,but
2013 Mar 09
2
quesion about lm function
Hi all: My data is in the attachment. I want to analysis the mean difference of y between 2 sex. My code: result_lm<-lm(y~factor(sex) + x1 + x2) summary(result_lm) The result of "factor(sex)m" 136.83, is the mean difference of y between 2 sex,and the corresponding p value is 0.07618. My question is: how to get the mean y of sex(m) and sex(f) respectively via lm function? Many
2005 Sep 27
3
Dummy quesion about environment
Hi, I'm trying to understand environment object in R. I used the example: f <- function(x) { y <- 10 g <- function(x) x + y return(g) } h <- f() h(3) then i saw that f return an environment > h function(x) x + y <environment: 01B28570> but I coudn't access to x and y object in that environment: I tried
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
2012 Jul 13
3
Help with R2 OpenBUGs
Hi, I'm currently working on the below codes however whenever I run it in openbugs it gives an error message saying: unknown type of logical function error pos 76. Any help would be appreciated. ## bugs code library(R2OpenBUGS) sink("C:/Users/CCF/Documents/Suzie Work/PTY Project/Waterhole Correction/ungulate.txt") cat(" model{ # hyperparameters # habitat effects for each
2007 Sep 25
6
R2Winbugs problem
Just while I use R2Winbugs, the following error will be presented. Please tell me how to cope with. Error in file(file, "r") : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' in: file(file, "r") -- View this message in context:
2010 Oct 31
2
transfer string to expression
Dear all: when I use parse() there is some problems. Below is an example: b0<-1 b1<-1 x<-1 str2expr<-function(x){eval(parse(text=x))} test1<-"b0+b1*sqrt(x)" test2<-"b0+b1" str2expr(test1) str2expr(test2) it can work well for test2 but not for test1. Could you tell me how to fix this problem or is there other more stable method to transfer an string to
2012 Sep 25
0
how to specify the multinomial distribution in R
Dear All, Could we specify the multinomial distribution in R when doing Bayesian data analysis through R2WinBUGS? See below for my issues. t2[i,1:2] ~ dmulti(p2[i,1:2],n2[i]) #t2[] is a matrix with two columns, the problem is how to specify it in R p2[i,1] <- (p[i] * s1[t[i]] * s2[t[i]] + (1 - p[i]) * (1 - c1[t[i]]) * (1 - c2[t[i]]))/p1[i] p2[i,2] <- (p[i] * s1[t[i]] * (1 - s2[t[i]]) +(1 -
2011 Jun 27
0
OpenBUGS and glmmBUGS package
Dear All, I am trying to use the glmmBUGS package with OpenBUGS under Linux. Here is a short list of code I modified from the diseasemapping package document: ---------------------------------------- library(diseasemapping) data(popdata) data(casedata) model = getRates(casedata, popdata, ~age*sex, breaks=seq(0, 90, by=10) ) ontario = getSMR(popdata,model, casedata) spplot(ontario,
2010 Nov 12
1
Problem retrieving data from R2InBUGS
Dear list I am calling the functiton bugs() provided by R2WinBugs to performs an IRT analysis. The function returns a set of estimated parameters over n replications/iterations. For each replication, two sets of person measures (theta1 and theta2) and two sets of item difficulty parameters (diff1 and diff2) are returned. The code used to obtain these estimates is as follows: sim <-
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.
2005 Sep 22
1
R2WinBUGS: Data loading error
Hi R-Help! I am trying to use R2WinBUGS but I get the following error message in WinBUGS (and there must be something wrong with my R statement as I tried it directly in WinBUGS and it worked): display(log) check(C:/Documents and Settings/Daikon/Roche/pop_model.txt) model is syntactically correct data(C:/Documents and Settings/Daikon/Roche/data.txt) expected key word structure compile(7) ...(and
2008 Jun 18
3
multiple multiplication in R
hi: just a very simple quesion,how to do multiple multiplication in R x<-c(1,2,3,4,5,6) how to get 1*2*3*4*5*6? I checked the Arithmetic Operators in R,but did not found the operators for this function,anyway can do this except the loop? [[alternative HTML version deleted]]