Displaying 1 result from an estimated 1 matches for "eqn1".
Did you mean:
eqn
2010 Apr 26
2
Using optim function for logistic model simulation
...c*birds + b*birds*(1-birds/K) where c = mortality, b = birth
rate, and K = carrying capacity.
I'm trying to find the optimal value of K and I've been using the
optim function. The problem is that it doesn't really work. My code is
below:
b<-1.22
c<-0.55
bird<-bird.density[0]
eqn1<- function(K1, bird) {
for (i in 1:8) {
b<-1.22
c<-0.55
bird <- 0.55*bird + b*bird*1-b*bird*bird/K
}
}
k1<-optim(c(0,10),eqn)
I realize this is a painfully amateurish question, but I really
appreciate any help! The other tricky part about this is that it looks
like there ar...