similar to: LSODA not accurate when RK4 is; what's going on?

Displaying 20 results from an estimated 800 matches similar to: "LSODA not accurate when RK4 is; what's going on?"

2004 Jun 10
2
odesolve: lsoda vs rk4
I'm trying to use odesolve for integrating various series of coupled 1st order differential equations (derived from a system of enzymatic catalysis and copied below, apologies for the excessively long set of parameters). The thing that confuses me is that, whilst I can run the function rk4: out <- rk4(y=y,times=times,func=func, parms=parms) and the results look not unreasonable:
2004 Oct 06
1
Foreign code problem
Hello, I wanted to test the odesolve package and tried to use compiled C-code. But when I do: erg <- lsoda(y, times, "mond", parms, rtol, atol, tcrit=NULL, jacfunc=NULL, verbose=FALSE, dllname="mond", hmin=0, hmax=Inf) I get the error message: Error in lsoda(y, times, "mond", parms, rtol, atol, tcrit = NULL, jacfunc =
2001 May 11
1
lsoda
I am running R 1.2.3 with ESS5.1.18 with Windows 98. I am trying to use lsoda in the odesolve apckage and am having problems. Question: The return value of the function of the system of ode's has to be a list that includes first, the ode's and second, "a vector (possibly with a `names' attribute) of global values that are required at each point in `times'." I
2010 Apr 06
1
estimating the starting value within a ODE using nls and lsoda
All- I am interested in estimating a parameter that is the starting value for an ODE model. That is, in the typical combined fitting procedure using nls and lsoda (alternatively rk4), I first defined the ODE model: minmod <- function(t, y, parms) { G <- y[1] X <- y[2] with(as.list(parms),{ I_t <- approx(time, I.input, t)$y dG <- -1*(p1 + X)*G +p1*G_b dX <-
2005 Nov 06
1
Problem defining a system of odes as a C library with lsoda
I have been trying to make use of the odesolve library on my university's Linux grid - currently R version 2.0.1 is installed and the system runs 64-bit Scientific Linux based on Redhat. I cannot seem to get lsoda working when I define the model as a shared C library. For example, the following snippet uses the mymod.c example bundled with the package: ### START rm(list=ls())
2010 Sep 16
1
More accurate ODE solver?
Dear All, I was using rk4 and lsoda to solve a ODE system. However, both of them gave bad accurate solutions, especially compared with Matlab solver ODE45. For example, ODE45 gave solutions that can go to a stable level (about 1.6) when time goes to infinity, however, the solutions from lsoda are decreasing to very very small (about 1e-130) numbers. Does R have more accurate ODE solvers as
2008 Nov 21
1
lsoda warning "too much accuracy requested"
Dear list - Does anyone have any ideas / comments about why I am receiving the following warning when I run lsoda: 1: lsoda-- at t (=r1), too much accuracy requested in: lsoda(start, times, model, parms) 2: for precision of machine.. see tolsf (=r2) in: lsoda(start, times, model, parms) I have tried changing both rtol and atol but without success. I saw the thread in the
2004 Jan 22
4
Fitting compartmental model with nls and lsoda?
Dear Colleagues, Our group is also working on implementing the use of R for pharmacokinetic compartmental analysis. Perhaps I have missed something, but > fit <- nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=0.5, k2=0.5)), + data=C1.lsoda, + start=list(K1=0.3, k2=0.7), + trace=T + ) Error in eval(as.name(varName), data) : Object
2013 Apr 21
1
lsoda question from deSolve package
Dear List, Wonder if you have some thoughts on the following question using lsoda in desolve: I have the following data and function: require(deSolve) times <- c(0:24) tin  <- 0.5 D <- 400 V    <- 26.3 k <-0.056 k12  <- 0.197118 k21  <- 0.022665 yini <- c(dy1 = 0,dy2 = 0)  events <- data.frame(var = "dy1",time = c(10,15),value = c(200,100),method =
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),
2005 Jul 27
4
odesolve/lsoda differences on Windows and Mac
Hi - I am getting different results when I run the numerical integrator function lsoda (odesolve package) on a Mac and a PC. I am trying to simulating a system of 10 ODE's with two exogenous pulsed inputs to the system, and have had reasonably good success with many model parameter sets. Under some parameter sets, however, the simulations fail on the Mac (see error message below). The
2003 Nov 05
3
using LSODA in R
R help list subscribers, I am a new user of R. I am attempting to use R to explore a set of equations specifying the dynamics of a three trophic level food chain. I have put together this code for the function that is to be evaluted by LSODA. My equations Rprime, Cprime, and Pprime are meant to describe the actual equation of the derivative. When I run LSODA, I do not get the output that
2004 Oct 04
3
Beginners problem
Hi, I'm new to R and have a problem with a little test program (see below). Why doesn't <<- in function rk4 assign the new value to y so that it is seen in rktest. I thought that <<- does exactly this. But it seems that I didn't get it right. I would be very appreciative for an explanation of that behaviour of <<-. I know how to write the whole thing so that it
2004 Jun 10
0
lsoda with arbitrary zero thresholds (with psuedo-solution)
Dear Hank, Last question first: really, only you can say for sure if 4e-281 and 5e-11 are small enough; it depends on the units you measure your state variables in. However, this strategy cannot get the state variables to exactly 0. Obviously, you could get closer to 0.0 faster by setting the derivatives even larger in absolute value. You may run into problems with the solver when the
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 <-
2002 Feb 01
1
typo and user-proofing in odesolve() (PR#1295)
A couple of minor points about the odesolve package (which I am otherwise enjoying very much): 1. "scalar" is misspelled as "scaler" in the definitions of the rtol and atol parameters 2. it is possible to crash R by doing something dumb, e.g failing to read the documentation carefully enough and (a) returning only a vector of derivatives and not a list of (derivatives,
2009 Jun 11
3
deSolve question
Dear All, I like to simulate a physiologically based pharmacokinetics model using R but am having a problem with the daspk routine. The same problem has been implemented in Berkeley madonna and Winbugs so that I know that it is working. However, with daspk it is not, and the numbers are everywhere! Please see the following and let me know if I am missing something... Thanks a lot in advance,
2006 Aug 26
1
problems with loop
Dear all, I am trying to evaluate the optimisation behaviour of a function. Originally I have optimised a model with real data and got a set of parameters. Now I am creating simulated data sets based on these estimates. With these simulations I am estimating the parameters again to see how variable the estimation is. To this end I have written a loop which should generate a new simulated data
2006 Apr 25
1
Windows MinGW compiler clarification, consequences
The information at http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW-compilers and http://www.murdoch-sutherland.com/Rtools/ is slightly inconsistent about the compiler used to build Windows binary packages available through cran. The 'candidate' package of the recommended MinGW-5.0.0.exe installs g++/g77 3.4.4 (as does the updated installer MinGW-5.0.2.exe). "An
2004 Feb 05
1
Installing odesolve under MacOSX
Installing odesolve in Raqua 1.8.0 or 1.8.1 under MacOSX gives the following message: Warning message: Installation of package odesolve had non-zero exit status in: install.packages(ui.pkgs, CRAN = getOption(where), lib = .libPaths()[1]) Moreover, in the source of odesolve is no makefile. Does anyone know how to get a proper installation? Maartje