Dear Luigi, On 2020-06-25 12:18 +0200, Luigi Marongiu wrote: > Hello, > I am trying to find the best fit to a > function for epidemic analysis. > I am trying with the package minpack.lm but > I don't really know how to use it.
Me neither ... > So I have some questions: > - how to solve the list problem? (what is > the input for nlsLM? I have a vector with > the actual values, shall I convert in a > dataframe?) I got past the error by give minpack.lm::nlsLM X and Y in a data.frame minpack.lm::nlsLM( formula = y~(a*x^2)/(b^2 + x^2), start=c(a=A, b=B), data=data.frame(x=X, y=Y)) as per ?minpack.lm::nlsLM: data: an optional data frame in which to evaluate the variables in‘formula’ and ‘weights’. Can also be a list or an environment, but not a matrix. > - how to avoid infinitives? > - is there another function other than > nlsLM that I should use? > - is there another function that could fit > a sigmoid profile other than Holling type > III? These other questions seem good and interesting, I hope someone else can answer them. Best, Rasmus
signature.asc
Description: PGP signature
______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.