1

I make fisheries work, and I need to estimate some parameters from the von Bertalanffy equation: Lt=Linf*(1-exp-K(t-t0)) here Linf, K, and t0 are the parameters that I want to estimate by FSA package and nls function While using R studio this error occurs at the step of nls as shown in the image: screenshot

My data are Fish age by day (age or t) VS length by mm (CL or Lt) as shown in the image: example of data

I want to solve this problem is the problem in my data(I import data from Excel sheet) or not

utobi
  • 11,726
  • The starting value for Linf makes little sense possibly the error might relate to that. The starting value is estimated at 1.47 while the values of your observations are already ten fold larger. This can make that the initial gradient becomes extremely large and practically infinite. – Sextus Empiricus Jul 06 '23 at 19:21
  • Firstly thank you for the useful comment, in the other data, set the starting value of Linf is large (36) that for 260 observations, and still the same error occurs. the image in the question is for just 10 observations only. – Dr Mohamed Ibrahim Jul 06 '23 at 19:34
  • Check out the other many questions on the singular gradient 1 2 3. Your problem seems to be just a variant and all that remains is the need to debug the software/code. That vbStarts is either not working correctly or not used correctly. It may also be that your data is too difficult for the selfstart function. – Sextus Empiricus Jul 06 '23 at 19:53
  • 1
    It may be that, instead of some coding error, your data is too difficult for the selfstart function. But that is difficult to figure out without a reproducible example (the images do not allow others to reproduce your problem). – Sextus Empiricus Jul 06 '23 at 19:59
  • I ran the package on an online example dataset and vbstarts works properly but in that data, the age is by years 1,2,3 years.; not by days as my data. I tried to convert values of days in my data to years another error occurs stats that:(error in numeric drev: missing values or an infinity produced when evaluating the model) – Dr Mohamed Ibrahim Jul 06 '23 at 20:31
  • Many variations of this question have been asked here on CV and their answers might be helpful to you, so please check out the hits for this site search. – whuber Jul 06 '23 at 21:26

0 Answers0