similar to: R2OpenBUGS question with differential equations

Displaying 20 results from an estimated 170 matches similar to: "R2OpenBUGS question with differential equations"

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
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
2012 Jul 13
3
R2OpenBUGS quesion
Dear All: Could anybody help me figure out why I get the Error message below while I running the example code of bugs() function in R2OpenBUGS packages? I have tried the code both in Win 7 and Ubuntu 12.04, but they show the same message. My R version is 2.15.1 in win7 and 2.15.0 in Ubuntu. Many thanks ! Best, Yilong > schools.sim <- bugs(data, inits, parameters, model.file,+
2005 Jul 19
2
Michaelis-menten equation
Dear R users: I encountered difficulties in michaelis-menten equation. I found that when I use right model definiens, I got wrong Km vlaue, and I got right Km value when i use wrong model definiens. The value of Vd and Vmax are correct in these two models. #-----right model definiens-------- PKindex<-data.frame(time=c(0,1,2,4,6,8,10,12,16,20,24),
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
2012 Nov 26
1
Help on function please
Dear All,   I could use a bit of help here, this function is hard to figure out (for me at least) I have the following so far:   PKindex<-data.frame(Subject=c(1),time=c(1,2,3,4,6,10,12),conc=c(32,28,25,22,18,14,11)) Dose<-200 Tinf <-0.5   defun<- function(time, y, parms) {  dCpdt <- -parms["kel"] * y[1]  list(dCpdt)  } modfun <- function(time,kel, Vd) {   out <-
2006 Nov 14
3
Plot title with numeric variables
I am trying to create a plot title in R with substitution by a numeric variable (Figure number N) within the text which is bold and has a subcripted part as well. Here is what I have: title <- expression(bold(paste("Figure ", N, ": Plot ", C[max], " versus CrCL"))) plot(1, main="") # Simple plot for testing N <- 5 mtext(title, line=3, font=2,
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,
2005 Feb 11
1
Help concerning Lasso::l1ce
Hi, First, when I try the example Prostate with bound 0.44 (as in the manual), I got a different result: > l1c.P <- l1ce(lpsa ~ ., Prostate, bound=0.44) > l1c.P .... Coefficients: (Intercept) lcavol lweight age lbph svi 1.0435803 0.4740831 0.1953156 0.0000000 0.0000000 0.3758199 lcp gleason pgg45 0.0000000 0.0000000
2011 Jun 24
0
lag and diff with transformBy
I have a question regarding?the very useful doBy package, and specifically, the transformBy() function?with the lag() and diff() functions. ?It is often useful to lag or difference data within a panel, i.e., within a by-group. ?Is the following code a safe use of transformBy? Is there an alternative? First, does the initial "orderBy" statement guarantee that the Time order will be
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
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
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
2003 Jul 07
0
nlmeODE package combining NLME with a differential equation solve r
Dear All A new non-linear mixed-effects modelling package for R called nlmeODE is now available at www.cran.r-project.org and http://nlmeODE.sourceforge.net. It combines Pinheiro and Bates' NLME library in R with an ordinary differential equations (ODE) solver thereby enabling the use of differential equations in population PK/PD modelling. It includes several PK examples such as one- and
2003 Dec 12
0
About differential evolution
Dear R user, I'm looking for differential evolution algorithm. Maybe some of you has realized some steps of this algotrithm? thanks, Raimis [[alternative HTML version deleted]]
2008 Aug 10
2
Differential Equations there use in R (population modeling)
e1 <- function(x,b,t){ d<-(x)*(b^t) plot(d) } e1(2, 2,seq(from=0, to=6, by=1)) Is there a way to do this with a change in time. I would like to use differential equations. I am trying to model a population with an initial value, fecundity per time step, and a death rate. The above simply shows an exponential growth rate. I would like to model species response like the famous
2000 Nov 17
1
Ordinary differential equations in R?
Is there any R code available for solving ODE's? I am considering building an interface to ODEPACK, but don't want to duplicate any existing effort. -- Tom Wainwright NOAA/NMFS/NWFSC 2030 S Marine Science Dr Newport, OR 97365 USA thomas.wainwright at noaa.gov -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2012 Jan 13
1
analytical solution of partial differential equation
i am trying to solve a partial differential equation analytically(PDE) in R . i have found some functions that do the stuff numerically. But that will not meet my purpose. is there any function to solve PDE analytically. please help. -- View this message in context: http://r.789695.n4.nabble.com/analytical-solution-of-partial-differential-equation-tp4291618p4291618.html Sent from the R help
2017 Dec 19
1
Partial differential equation
Hello, I am having troubles with heat conduction problem. Below is the given information. Should I move forward with this problem like any other 1-D PDE? ?T/?t = a* (?^2T/?x^2) I.C. For t = 0 and 0 ? x ? 10, T = 0 ?C B.C. For x = 0 cm and all t , T = 100?C For x = 10 cm and all t , T = 0 ?C The thermal diffusivity is a = 2.0 cm^2 /s. I also added what I have for code in R. Any help will
2017 Jun 21
0
How to apply a system of ordinary differential equations to a cell grid?
> On Jun 21, 2017, at 12:48 PM, Marine Regis <marine.regis at hotmail.fr> wrote: > > Hello, > > I am developing an agent-based model to simulate the spread of infectious diseases in heterogeneous landscapes composed of habitat polygons (or clumps of connected cells). To simplify the model, I consider a habitat grid (or raster) containing the polygon ID of each cell. In