Re: [R] DeSolve Package and Moving Average

2017-11-29 Thread Eric Berger
Since you only provide pseudo-code I will give a guess as to the source of the problem. It is easy to get "burned" by use of the ifelse statement. Its results have the same "shape" as the first argument. My suggestion is to try replacing ifelse by a standard if ( ) { } else { } HTH, Eric

[R] DeSolve Package and Moving Average

2017-11-29 Thread Werning, Jan-Philipp
Dear all, I am using the DeSolve Package to simulate a system dynamics model. At the problematic point in the model, I basically want to decide how many products shall be produced to be sold. In order to determine the amount a basic forecasting model of using the average of the last 12 time pe

Re: [R] deSolve package

2015-10-17 Thread Thomas Petzoldt
Dear Andre, some people would be happy to assist you, but your code fragment is incomplete, so diagnosing your problem was impossible. Please read the posting guide and provide a minimum reproducible example. Furthermore I wonder why you use dede and not ode, and why sum() with empty parenth

Re: [R] DeSolve package

2015-10-16 Thread Giorgio Garziano
It is likely the "p" variable is not defined in your R environment. Inside your function model.LIDR, the variable "p" is used before being initialized in any of the environments reachable by the search path, included the model.LIDR function environment. The remedy is to define and initiali

[R] DeSolve package

2015-10-15 Thread Andre Jackson
I have the following differential equations and return list: dCgd.dt = -kad*y[1]-kgd*y[1] # PK model equation gut d dCld.dt= kad*y[1]-rhyd-rmetd #pk model equation liver d dCgl.dt = -kal*y2[1]-kgl*y2[1] # PK model equation gut l dCll.dt= kal*y2[1]-rhyl-rmetl #pk model

Re: [R] Desolve package: How to pass thousand of parameters to C compiled code?

2010-06-11 Thread Thomas Petzoldt
On 6/8/2010 2:03 PM, Ben Bolker wrote: yahoo.com> writes: Hi, I have used DeSolve package for my ODE problem regarding infectious disease transmission and currently am trying to pass lots (roughly a thousand) of model parameters to the C compiled model (I have to use C compiled code inst

Re: [R] Desolve package: How to pass thousand of parameters to C compiled code?

2010-06-08 Thread Ben Bolker
yahoo.com> writes: > > Hi, > > I have used DeSolve package for my ODE problem regarding > infectious disease transmission and currently am > trying to pass lots (roughly a thousand) of model parameters > to the C compiled model (I have to use C > compiled code instead of R code purely because

[R] Desolve package: How to pass thousand of parameters to C compiled code?

2010-06-07 Thread cmmu_mile
Hi, I have used DeSolve package for my ODE problem regarding infectious disease transmission and currently am trying to pass lots (roughly a thousand) of model parameters to the C compiled model (I have to use C compiled code instead of R code purely because of the speed). I can't go define it