search for: odemodel

Displaying 8 results from an estimated 8 matches for "odemodel".

Did you mean: codemodel
2004 Jun 14
1
olesolve: stepsize
Hi, I am doing a project on the simulation of glucose metabolism based on a pharmacokinetic modeling in which we have 4 differential equations. I did this in R by using the odesolve package. It works very well, but I have two questions: Here is the odemodel function _________________________________________________ Ogtt.Odemodel <- function(t, y, p) { absx <- c(-60, -45, -30, -15, 0, 5, 10, 15, 20, 25, 30, 45, 60, 75, 90, 105, 120, 140, 160, 180, 210, 240, 270, 301) absx <- absx + 60 absy <- c(0, 0, 0, 0, 0, 156.1225165,...
2003 Oct 23
2
OOP like handling of lists?
...[1] - p["k2"] * x[1] * x[2] dx2.dt <- - p["k3"] * x[2] + p["k2"] * x[1] * x[2] list(c(dx1.dt, dx2.dt)) }, parms = c(k1=0.2, k2=0.2, k3=0.2), xstart = c(prey=0.5, predator=1) # and some more elements ... ) class(lvmodel) <- "odemodel" ## Getting and setting parameters ################################### getParms <- function(model) { model$parms } setParms <- function(model, parmlist) { for (i in 1:length(parmlist)) { model$parms[names(parmlist[i])] <- parmlist[[i]] } invisible(model) } ## Simu...
2009 Sep 25
1
simulating a model
...ver, I can't simulate it properly. Two guesses: my script isn't right; I'm not setting the parameters properly I have uploaded an image to the model here: http://img24.imageshack.us/img24/743/imagemutr.jpg The script I am using is as it follows: require(simecol) mod1 <- new("odeModel",   main = function(time, init, parms) {   x <- init   p <- parms     dx1 <- p["K"] - p["alpha"]*x[1]*x[2] - p["gamma"]*x[1]     dx2 <- x[1]*x[2]*(p["alpha"] - p["beta"])     dx3 <- p["beta"]*x[1]*x[2] + p["gamma&q...
2013 May 27
0
fitting grid-based models
Hello! I'm interested to fit parameters (to data) in a grid-based (individual) model. If I understood well, simecol library has the fitOdeModel function but it is only suited to odeModels (differential equation). Alternatively, FME package has several functions able to perform this procedure but all examples are for differential eq. models. It is mentioned in the that such functions could also be used for other kind of models. Could thus b...
2008 Dec 01
1
Attempting to get a STELLA model into R
To whomever may be of help, I am a student in a graduate modeling class at the University of North Carolina at Wilmington. I am trying to get a STELLA model converted into R. I am in the process of trying to 're-write' the script into R, but I seem to be missing pieces (i.e. parm values) that are keeping me from being able to replicate this model into R. Does anyone have an idea of a
2008 Nov 09
3
Arms Race
hey can anybody help me? i have to simulate the richardson Arms race model on R.. for my simulation class...
2009 Jun 12
1
coupled ODE population model
I'm fairly new to R, and I'm trying to write out a population model that satisfies the following; the system consists of s species, i= 1, 2,...,s network of interactions between species is specified by a (s x s) real matrix, C[i,j] x[i] being the relative population of the "ith" species (0 =< x[i] =< 1, sum(x[i]=1) the evolution rule being considered is as follows;
2010 Dec 11
2
Predator Prey Models
Dear R-users, I am currently modifying a previously developed predator prey model and was curious if there was a way to add in a disturbance to the model (let's say at time t=100). The disturbance can be the introduction of 40 prey (N=40) and 10 predators (Pred = 10). I would like to see my model go from a state of equilibrium (up to t = 99), show this disturbance (at t = 100) and then