# What is the best fit for this data?

First I entered the data and graph it, then I used the non-linear adjustment command to have a model of my data, I asked Mathematica for the square r, to know how good the model was, then I put together the graphs of the data and the adjustment , but I'm not satisfied with the result. I think it can be improved. Thank you.

DATA = {{16, 2508}, {18, 2518}, {20, 3000}, {22, 3423}, {24,
3507}, {26, 3400}, {28, 3500}, {30, 3883}, {32, 3823}, {34,
3646}, {36, 3708}, {38, 3333}, {40, 3517}, {42, 3214}, {44,
3103}, {46, 2276}};
gt = ListPlot[DATA]
agt = NonlinearModelFit[DATA, b x^a, {a, b}, x]
Show[ListPlot[DATA, PlotStyle -> Red], Plot[agt[x], {x, 0, 45}]]  • If you do not provide code that can easily be copied by other people, you are much less likely to get any help on your problem. – J. M. will be back soon Oct 10 '18 at 21:09
• I added it, thanks. – Rayo LV Oct 10 '18 at 21:20
• Is there a process that generates the data that would suggest a particular model (such as the one you tried)? – JimB Oct 10 '18 at 21:23
• This is the description of the problem. An article by J.Agricultural En.Research, 1975 (pp.353-361) reports the following data (DATA), with the number of days after flowering (D), and harvest yield (R) : (D) and (R) are the data inside the "DATA" input – Rayo LV Oct 10 '18 at 21:31
• How about a simple quadratic? $a x^2 + b x + c$ – wxffles Oct 10 '18 at 22:32

Clear[a, b, c, f, x]

data = {{16, 2508}, {18, 2518}, {20, 3000}, {22, 3423}, {24,
3507}, {26, 3400}, {28, 3500}, {30, 3883}, {32, 3823}, {34,
3646}, {36, 3708}, {38, 3333}, {40, 3517}, {42, 3214}, {44,
3103}, {46, 2276}};


As suggested by wxffles

model = a*x^2 + b*x + c;

f[x_] = (nlm = NonlinearModelFit[data, model, {a, b, c}, x]) // Normal

(* -1945.07 + 362.23 x - 5.74724 x^2 *)

Plot[f[x], {x, 14, 49},
PlotRange -> {2000, 4000},
Epilog -> {Red, AbsolutePointSize, Point[data]}] nlm["ParameterTable"] 