stephen sefick
2008-Aug-10 18:47 UTC
[R] Differential Equations there use in R (population modeling)
e1 <- function(x,b,t){ d<-(x)*(b^t) plot(d) } e1(2, 2,seq(from=0, to=6, by=1)) Is there a way to do this with a change in time. I would like to use differential equations. I am trying to model a population with an initial value, fecundity per time step, and a death rate. The above simply shows an exponential growth rate. I would like to model species response like the famous exponential growth rate leveling off at a carrying capacity with all of the three input variables being on a slider from TeachingDemos package population# = (initialvalue @ t) - (death rate) + (fecundtity per individual) dt any ideas Stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
Ben Bolker
2008-Aug-11 13:43 UTC
[R] Differential Equations there use in R (population modeling)
stephen sefick <ssefick <at> gmail.com> writes:> > e1 <- function(x,b,t){ > d<-(x)*(b^t) > plot(d) > } > > e1(2, 2,seq(from=0, to=6, by=1)) > > Is there a way to do this with a change in time. I would like to use > differential equations.I'm not sure what you mean by "do this with a change in time", but in general for ODEs you should check out lsoda in the odesolve package. You can also look at the ecology/environment task view. Ben Bolker
Roland Rau
2008-Aug-11 18:53 UTC
[R] Differential Equations there use in R (population modeling)
Hi, stephen sefick wrote:> e1 <- function(x,b,t){ > d<-(x)*(b^t) > plot(d) > } > > e1(2, 2,seq(from=0, to=6, by=1)) > > Is there a way to do this with a change in time. I would like to use > differential equations. I am trying to model > a population with an initial value, fecundity per time step, and a > death rate.just a small recommendation: do you know Hal Caswell's Book "Matrix Population Models"? This is the homepage of the book http://www.sinauer.com/detail.php?id=0965 He explains in detail how to construct and analyze population models with an initial value and (time varying) fertility and mortality. The matrix models in his book allow also to relax your (implicit) assumption of having no age structure in your population. I hope this helps you further. Best, Roland