I am trying to fit a polynomial to the data listed as


When I use


I get

FittedModel[6.67-42.6435x+16.1427x^2-<<19>>x^3 +<<20>>x^4-0.00367168x^5 +0.0000409458x^6.

I don't understand why I am not getting any coefficients for the x^3 and x^4 terms that make sense and would like some assistance in solving this problem.

  • 1
    $\begingroup$ When you have fm = LinearModelFit[…], then you can query the coefficients like this: fm["BestFitParameters"] $\endgroup$ – SHuisman Feb 25 at 16:56

Looks like a severe case of overfitting

lmf = LinearModelFit[data, {x, x^2, x^3, x^4, x^5, x^6}, x]
Show[{ListPlot@data, Plot[lmf[x], {x, 0, 30}]}, PlotRange -> All]

enter image description here

|improve this answer|||||

Not the answer you're looking for? Browse other questions tagged or ask your own question.