similar to: new version of package deSolve on CRAN

Displaying 20 results from an estimated 1000 matches similar to: "new version of package deSolve on CRAN"

2011 Oct 03
0
deSolve - Function daspk on DAE system - Error (Vince)
Vince, When that happens, one possible reason is that your DAE is of index > 1, which cannot be solved by daspk. The solver radau, also from deSolve can handle DAEs up to index 3, but you need to rewrite the problem in the form M*y' = f(x,y), where M is a mass matrix. If you do that for your problem, and solve it with radau, then radau complains that the "matrix is repeatedly
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 14
1
(no subject)
Hi, I am trying to solve a model that consists of rather stiff ODEs in R. I use the package ODEsolve (lsoda) to solve these ODEs. To speed up the integration, the jacobian is also specified. Basically, the model is a one-dimensional advection-diffusion problem, and thus the jacobian is a tridiagonal matrix. The size of this jacobian is 100*100. In the original package
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
2014 Sep 02
0
unexpected behavior of <<- in nlm (lazy?)
Hi, while working with closures in deSolve we have found unexpected behavior in R 3.1.0 and R 3.1.1 and R devel, while it was still as expected in R 3.0.3. This behavior occurs also in several functions of other packages like nls.lm from minpack.lm and even nlm in base, while some other functions worked as expected. See example below. The symptom is that super assignments (<<-) of
2012 Feb 03
1
Logistic population growth and deSolve
Hello, I am new to R and I am having problems trying to model logistic population growth with the deSolve package. I would like to run the model for four populations with the same initial population and carrying capacity but with different growth rates and put the results into a data frame. When I run the following lines of code I get unexpected results from "output" but the format is
2011 Aug 12
1
deSolve output
Hi, I've solved a simple differential equation describing the degradation of amino acid carbon (THAA-C) using deSolve. Code is a follows: # Input of model parameters, a and b describes form of curve, i is apparent initial age of Org. C. parameters <- c(a = a, b = b, i=i) # Initial value of the model, G state = c(G = G) #specifies the function degradation as a function of
2013 Feb 21
1
using and event in deSolve
Hi All Having been pointed the use of events and roots in deSolve, I was able to implement the Izchikevich model of spiking neurons. However, I'm not too sure of defining the event. The deSolve documentation says: An event is triggered when the ball hits the ground (height = 0) Then velocity (y2) is reversed and reduced by 10 percent. The root function, y[1] = 0, triggers the event: >
2010 Jun 07
1
Desolve package: How to pass thousand of parameters to C compiled code?
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 one by one as it gonna take ages to finish and also quite difficult to revise. I have read the
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
2018 May 31
0
Help in dynamic simulation using deSolve
Hi R help, I wanted to simulate two pool model (A&B) using deSolve package for time 0 to 12 by 1.? Initial values of the state variables are A=5, B=3. The fluxes are as follows1) Flux into A= 5 units per unit time?2) Flux from A to B= 0.33) Flux out of A=0.1?4) Flux from B to A=0.35) Flux out of B=0.3 Here is the R code I compiled to estimate the size of A and B and graph the output
2009 Jun 12
2
External signal in ODE written in C (using deSolve and approx1?)
Dear list The deSolve package allows you to specify the model code in C or Fortran. Thanks to the excellent vignette this works fine. However I have not yet managed to use forcing functions in C code. In pure R code this works very well with approxfun() specified outside the model: ############################################### #Model lvml <- function(t, x, parms) {
2013 Jun 18
1
deSolve question
Dear All wonder if you could provide some insights on the following: currently I have this code which produces the expected results: require(deSolve) pars <- list(k = 0.08,v=15) intimes <- c(0,0.5,12) input <- c(800,0,0) forc <- approxfun(intimes, input, method="constant", rule=2) derivs <- function(t, state, pars) { inp <- forc(t) dy1 <- - pars$k * state[1]
2017 Nov 29
1
DeSolve Package and Moving Average
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 periods shall be used. My code looks like the following. ? [?] # Time units in month START<-0;
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
customizing color key with plot3D
Karline, Thank you for your help. I discovered that in addition to including clim, I needed to omit breaks. This code uses one of your other examples as a starting point and works as intended: persp3D(z = volcano, zlim = c(-60, 200), phi = 20, colkey = list(length = 0.2, width = 0.4, shift = 0.15, cex.axis = 0.8, cex.clab = 0.85), lighting = TRUE, lphi = 90, clab =
2003 May 27
3
The Wrong Choice: Locked in by license restrictions
A colleague pointed me to this article advocating R as a Matlab substitute. Here is the link (deliberately on two lines: http://searchenterpriselinux.techtarget.com/ originalContent/0,289142,sid39_gci902076,00.html I'm not a Matlab user, but I understand that it provides a nice front end to the Linpack collection of numerical linear algebra routines. My friend and I wonder if R can really
2006 Jun 12
2
solving first-order differential equation
I am an initial user of R. Could you give me some explanations or examples on how to solve the first order differential equations by the first-order Runge-Kutta method? Thank you very much Kind regards
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,
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,