Closed diogoprov closed 2 months ago
Thanks for the note. This is a common problem with a) sparse data sets; b) data sets that don't follow the general von B curve shape (e.g., no obvious asymptote); c) data sets with few young fish (so hard to define t0); few old fish (so no obvious asymptote and thus hard to define Linf), or both; d) data sets with lots of variability in length-at-age (i.e., fish of the same age have very variable lengths; e) poor starting values; or f) something else.
It is difficult to provide a more specific answer without your data. I would suggest using plot=TRUE
in your vbStarts()
code so that you can "see" how your data fits the vonB model with your starting values. This plot will also provide some insight into whether your data will look like they might follow a vonB model.
Depending on what this plot looks like you might a) realize that a von B is not appropriate for your data, b) your data is inadequate to fit the model, c) you should use better starting values, d) you should increase the number of iterations or the tolerance in nls()
(see ?nls.control
), e) you should use a different fitting algorithm, f) you should not try to fit a model and just report the mean lengths-at-age, or g) something else.
After all of that, I suspect you simply have a data problem (i.e., you basically only have 3 ages of frogs ... ages 4-7 are represented by only one fish each).
Hope that this helps some. Good luck with your project.
p.s., I am away for the next week or so, and won't, if you reply, be able to respond during that time.
Indeed, we don't have enough data points in some ages. The model line doesn't seem to pass through most of the points when I shoose 'typical' and consequently gives poor starting values:
but then, even if I change to other param
, like:
starts <- vbStarts(formula = svl ~ age, data = frog_data, plot = TRUE, param = "vonBertalanffy")
it draws a straight line with not clear starting age. So the problem seems not to be the asymptote, but with the uncertainty/wide variation in length for young frogs...
We'll try to perhaps add more data as we go along and see what happens.
Thank you very, very much for your quick - enlightening - response.
All the best, Diogo
Hi, I'm trying to fit a von Bertalanffy curve to a relatively small data set. It has
I'm following your tutorial:
but then I got an error in the
nls
function. ThevbStarts
was also returning an error, but changing themeth0
solved it.There's relatively little variation in age. This is for frogs.
Any ideas?
Thank you