[R] Plotting a curve for a Holling Type III Functional Response

Student mpchilds at middlebury.edu
Sat Apr 6 22:42:39 CEST 2013


Hey,

So I have a scatter plot and I am trying to plot a curve to fit the data
based on a Holling Type III functional response. My function is this:

nll2<-function(a,b) {
  conefun<-(a*DBH^2)/(b^2+DBH^2)
  nlls2<-dnbinom(x=cones ,size=DBH, mu=conefun,log=TRUE)
  -sum(nlls)
}

and my plot is this:

plot (DBH,cones)

DBH is on the x-axis and cones is on the y-axis. How do I get the curve for
my function onto the scatterplot?




--
View this message in context: http://r.789695.n4.nabble.com/Plotting-a-curve-for-a-Holling-Type-III-Functional-Response-tp4663556.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list