I have some problems with the NonlinearModelFit, i want to fit the analytical data to one function consisting of two Lorentzians
wr=3.1416;
model = (a /((t - wr )^2 + b^2)) - (c/((t - wr)^2 + d^2))
result = NonlinearModelFit[data, model, {a, b, c, d}, t, MaxIterations -> 800, Method -> {NMinimize}]
result["BestFitParameters"]
result["AdjustedRSquared"]
result["AIC"];
fitplot1 = Show[ListPlot[data], Plot[result[t], {t, 2.5, 3.8}, PlotRange -> Full]]
The model should fit my
{{2.5906, 0.0561}, {2.6006, 0.0611}, {2.6106, 0.0663}, {2.6206, 0.0719},
{2.6306, 0.0779}, {2.6406, 0.0843}, {2.6506, 0.0912}, {2.6606, 0.0985},
{2.6706, 0.1064}, {2.6806, 0.1148}, {2.6906, 0.1237}, {2.7006, 0.1333},
{2.7106, 0.1437}, {2.7206, 0.1547}, {2.7306, 0.1666}, {2.7406, 0.1793},
{2.7506, 0.1931}, {2.7606, 0.2078}, {2.7706, 0.2237}, {2.7806, 0.2409},
{2.7906, 0.2594}, {2.8006, 0.2793}, {2.8106, 0.3009}, {2.8206, 0.3242},
{2.8306, 0.3494}, {2.8406, 0.3767}, {2.8506, 0.4061}, {2.8606, 0.438},
{2.8706, 0.4723}, {2.8806, 0.5093}, {2.8906, 0.5491}, {2.9006, 0.5916},
{2.9106, 0.6367}, {2.9206,0.6843}, {2.9306, 0.7338}, {2.9406, 0.7843},
{2.9506, 0.8348}, {2.9606, 0.8834}, {2.9706, 0.9276}, {2.9806, 0.9644},
{2.9906, 0.9899}, {3.0006, 1.}, {3.0106, 0.9906}, {3.0206, 0.9586},
{3.0306, 0.9025}, {3.0406, 0.8234}, {3.0506, 0.7248}, {3.0606, 0.6131},
{3.0706, 0.4955}, {3.0806,0.3798}, {3.0906, 0.2727}, {3.1006, 0.1794},
{3.1106, 0.1037}, {3.1206, 0.0479}, {3.1306, 0.0132}, {3.1406, 0.00010186},
{3.1506, 0.0089348}, {3.1606, 0.0395}, {3.1706, 0.0914}, {3.1806, 0.1634},
{3.1906, 0.2535}, {3.2006, 0.3583}, {3.2106, 0.4728}, {3.2206, 0.5906},
{3.2306, 0.7041}, {3.2406, 0.8057}, {3.2506, 0.889}, {3.2606, 0.9497},
{3.2706, 0.9863}, {3.2806, 0.9998}, {3.2906, 0.9931}, {3.3006, 0.9703},
{3.3106, 0.9354}, {3.3206, 0.8923}, {3.3306, 0.8444}, {3.3406, 0.7941},
{3.3506, 0.7435}, {3.3606, 0.6937}, {3.3706, 0.6457}, {3.3806, 0.6001},
{3.3906, 0.5571}, {3.4006, 0.5168}, {3.4106, 0.4793}, {3.4206, 0.4444},
{3.4306, 0.4121}, {3.4406, 0.3822}, {3.4506, 0.3545}, {3.4606, 0.3289},
{3.4706, 0.3052}, {3.4806, 0.2834}, {3.4906, 0.2631}, {3.5006, 0.2443},
{3.5106, 0.2269}, {3.5206, 0.2108}, {3.5306, 0.1958}, {3.5406, 0.1819},
{3.5506, 0.169}, {3.5606, 0.1569}, {3.5706, 0.1457}, {3.5806, 0.1353},
{3.5906, 0.1255}, {3.6006, 0.1164}, {3.6106, 0.1079}, {3.6206, 0.1},
{3.6306, 0.0926}, {3.6406, 0.0856}, {3.6506, 0.0791}, {3.6606, 0.0731},
{3.6706, 0.0674}, {3.6806, 0.062}, {3.6906, 0.057}, {3.7006, 0.0524},
{3.7106, 0.048}, {3.7206, 0.0439}, {3.7306, 0.0401}, {3.7406, 0.0365},
{3.7506, 0.0331}, {3.7606, 0.03}, {3.7706, 0.0271}, {3.7806,0.0244},
{3.7906, 0.0218}}
The result is
ListPlot[Transpose[{Abs[data[[All, 1]] - Pi], data[[All, 2]]}]]
. I think there's almost perfect symmetry. $\endgroup$