Skip to main content
5 of 7
added 1 character in body

Having problems with NonlinearModelFit

I have data points — denoted in the Plot by $F_k$ — covering quite a large range $(1,\,10^{1010})$. I plotted them with ListLogPlot. Then I tried to fit the data points using NonlinearModelFit, and now I have two problems:

  1. Fitting the data points

     fit = NonlinearModelFit[Fk[300], a*k^(B*k), {a, B}, k] 
    

    gives 1 k^1 for the fitted model.

    However, fitting the data points with:

     fit2 = NonlinearModelFit[Fk[300], a*k^(b*c*k), {a, b, c}, k] 
    

    gives the fitted model 140.714 k^1.16997 k which I completely do not unterstand. I mean why should the output change upon inserting the variable $c$, which could also be combined with $b$ such that say $b\,c= B$ and fit should be equal to fit2.

  2. If I now plot the data $F_k$ vs. $k$ together with the fitted model, the fitted curve ends at some value of $k \approx 120$, and I do not unterstand why. My code for this is

     Show[{ListLogPlot[Fk[300], PlotStyle -> Red], LogPlot[fit2[k], {k, 0, 300}]}]
    

plot

Red dots = data points; blue line = fitted curve