Displaying 20 results from an estimated 2000 matches similar to: "epidemiology ode likelihood, hierarchical model"
2003 May 29
0
ODE solvers in R (was:The Wrong Choice: Locked in by license restrict...
Dear Colleague:
I am glad to hear from you. I was going to contact you and ask if you have
notes on the steps involved on how you implemented LSODA. I will gladly take the
project on. In addition to dassl, I want to implement ODESSA also. In other
words, my project is a "suite" of ode solvers for R. The application of these
solvers will be to the study of the distribution of
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
2017 Jul 17
0
How to apply a system of ordinary differential equations to a cell grid?
It seems that the method `iteration` in the function `ode` can be useful in my case:
> Method "iteration" is special in that here the function func should
> return the new value of the state variables rather than the rate of
> change. This can be used for individual based models, for difference
> equations, or in those cases where the integration is performed within
>
2017 Jun 21
4
How to apply a system of ordinary differential equations to a cell grid?
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 addition, I have epidemiological parameters associated with each polygon ID. At each time step, the parameter values
2012 Apr 25
1
Using apply() with a function involving ode()
Hello,
I am trying to get the output from the numerical simulation of a system
of ordinary differential equations for a range of values for three
parameters. I am using the ode() function (deSolve package) to run the
numerical simulation and apply() to run the simulation function for each
set of parameter values. I am having trouble getting the apply()
function to work.
Here is an
2011 Jan 25
1
deSolve: Problem solving ODE including modulo-operator
I have a problem integrating the 'standard map' (
http://en.wikipedia.org/wiki/Standard_map
http://en.wikipedia.org/wiki/Standard_map ) with deSolve:
By using the modulo-operator '%%' with 2*pi in the ODEs (standardmap1), the
resulting values of P and Theta, should not be greater than 2pi. Because
this was not the case, i was thinking that the function 'ode' has some
2010 Oct 24
1
Optimize parameters of ODE Problem which is solved numeric
Hi,
I have a data-matrix:
> PID
sato hrs fim health
214 3 4.376430 6.582958 5
193 6 4.361825 3.138525 6
8441 6 4.205771 3.835886 7
7525 6 4.284489 3.245139 6
6806 7 4.168926 2.821833 7
5682 7 1.788707 1.212653 7
5225 6 1.651463 1.436980 7
4845 6 1.692710 1.267359 4
4552 5 1.686448 1.220539 6
2009 May 13
2
ode first step
Hi all,
I try to assess the parameters (K1,K2) of a model that describes the
adsorption of a molecule onto on adsorbent.
equation: dq/dt = K1*C*(qm-q)-K2*q
I know the value of 'qm' and I experimentally measure the variables 'q',
'C', and the time 't'.
t C q
1 0 144.05047 0.0000000
2 565 99.71492 0.1105625
3 988 74.99426
2012 Apr 27
0
How to find eigenfunctions and eigenvalues of a fourth order ODE
Dear all,
I am having trouble with the following problem. Suppose we have the fourth
order ODE with boundary conditions:
http://r.789695.n4.nabble.com/file/n4591748/problem.jpg problem.jpg
where q(t) is a known function.
Note here the lambda parameter is changing, so essentially we have a series
of ODEs. lambda is called an eigenvalue, the solution y is called an
eigenfunction associated with
2018 Apr 12
1
ODE
Hello All,
I'm struggling to solve this ODE using R,
vdpol <- function (h, v, t) (
list(c (
-0.1*v/(pi*(2*10*h-h^2)),
(v = (-0.1*v/(pi*(2*10*h-h^2))^2) + 2*9.81*h))
))
library(deSolve)
yini <- (c(h = 20, v=0))
nonstiff <- ode(y = yini, func = vdpol,
times= seq(0, 30, by =
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
2012 Jul 03
1
Wrapper function for multivariate arrays for ode
I am trying to to write a wrapper function for the ode solver (under
the package desolve) to enable it to take multivariate arrays. I know
how to do it for 1 dimension arrays but my code breaks down when I try
to do it for 2 dimensional arrays. Here is my code
diffwrap<-function(t,y,mu)vdpol(t=t,A[1:3,1:4]<-y[1:12],B[1:12]<-y[13:24],mu=mu)
vdpol<-function(t,A,B,mu)
{
list(c(mu,
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 <-
2012 Jan 30
2
ode() tries to allocate an absurd amount of memory
Hi there R-helpers:
I'm having problems with the function ode() found in the package deSolve.
It seems that when my state variables are too numerous (>33000 elements),
the function throws the following error:
Error in vode(y, times, func, parms, ...) :
cannot allocate memory block of size 137438953456.0 Gb
In addition: Warning message:
In vode(y, times, func, parms, ...) : NAs
2013 Jan 27
0
Package for multi-dimensional terminal value ODE solver
Hi,
I did some googling. I found multiple ODE solver packages. But I am
wondering if there is any terminal value ODE solver (linear case) for
multi-dimension case or not? I have not come across any. Any guidance would
be appreciated.
Robert
[[alternative HTML version deleted]]
2016 Apr 26
0
vectors of equations in ode / desolve
Hello,
I have a syntactic problem with ode. How do I specify vectors of
equations in ordinary differential equation systems. (i.e. in my case I
want to simulate an a priory undefined number of species that have
different parameters but the same behaviour)
I demonstrate this using the Lotka Volterra example. The code below does
not work and I have not a good idea how to specify this right.
##
2011 Aug 16
1
deSolve, extracting variable values from inside ode function
I'm just getting to grips with using ode function and have used the
examples and vignettes to produce a small model of a one-pool,
michaelis-menten, enzyme kinetic reaction. The rate of flux of substrate
into pool A is constant (fluxoa) however the rate of flux out of pool A
is controlled by the HMM equation (v = Vmax/ ( 1 + (Km / Concentration A
)) ). This function works fine and
2011 Mar 15
1
precompiled ode with spline input
I tried to use lsode with precompiled C code instead of an R function
defining the derivatives. No problem so far.
However, now I need to implement an ODE that contains spline functions,
i.e. the derivatives at given time points depend on the value of a
spline function at this time point. What is an efficient way to
implement this in precompiled C code?
--
Daniel Kaschek <daniel.kaschek at
2013 May 02
2
ODE solver
I am trying to use the package ode and periodically it will come up with
this error message
Warning..Internal T (=R1) and H (=R2) are
such that in the machine, T + H = T on the next step
(H = step size). Solver will continue anyway.
And then the program just take very long to run. Is there anyway to get the
program to terminate when this warning is issued instead of continuing to
run ?
2013 Apr 10
0
Problem with ode
Hi,
I am trying to run a 1D nutrient-phytoplankton-zooplankton model in R
using the package 'deSolve'. The code is shown below:
DEPTH = seq(2.5, 147.5, 5)
NPZ = function(t, state, params){
with(as.list(params), {
P <- state[1:NB]
Z <- state[(NB + 1): (2*NB)]
N <- state[(2*NB + 1): (3*NB)]
F.I = function(z, hr){
I0 = function(hr){