[R] An applied math question with solve()

Martin Henry H. Stevens hstevens at muohio.edu
Fri Aug 10 17:09:34 CEST 2001


I have a math (and maybe an R) question.
I want to find equilibrium population density values for a system of linear
population growth equations (e.g., Pimm and Lawton 1977). The eventual goal
is to
perform stability analysis. I can find the partial differential equations
for the Jacobian matrix, but I get stuck trying finding the equilibriuym pop
densities (X*). Here is the (incorrect?) R code for for the X*:

# An attempt at stabiltiy analysis.
# Each pop growth equation -  (Not code)  is dXi/dt = Xi ( bi +
Sum(a[i,j]Xj) )
# Set dX/dt = 0, divide both sides by Xi and you get bi + sum(aijXj) = 0
# For three species this is represented by:

a[1,1] + a[1,2] + a[1,3] = 0
a[2,2] + a[2,1] + a[2,3] = 0
a[3,3] + a[3,1] + a[3,2] = 0

#select random coefficients that should result in positive X*'s
a <- matrix(-runif(9), nrow=3,ncol=3); diag(a) <- 1
a
solve(a,rep(0,3))
# This returns the trivial answer. How do I get the meaningful one???

Thanks for any help,
Henry


*****************************
Martin Henry H. Stevens
HStevens at muohio.edu
tel: (513) 529 - 4206
FAX: (513) 529 - 4243

338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list