I am trying to fit my data to the following function,
$$\frac{a b t \left(\log \left(\frac{-a d t+a t-1}{a d t}\right)-2\right)}{4 (a t-1)}-c$$
data = {
{0.275, 23.85}, {0.275, 22.03}, {0.2613, 21.13}, {0.2888, 20.77}, {0.3438, 18.71},
{0.2475, 17.7}, {0.3301, 17.65}, {0.3163, 16.79}, {0.3713, 17.09}, {0.3851, 14.92},
{0.4126, 14.37}, {0.4401, 12}, {0.3851, 11.7}, {0.4813, 11.14}, {0.4538, 10.64},
{0.4676, 10.08}, {0.4951, 9.63}, {0.4951, 8.975}, {0.5639, 8.42}, {0.6601, 8.571},
{0.5914, 7.311}, {0.5088, 7.613}, {0.5088, 7.361}, {0.5776, 6.756}, {0.7564, 6.807},
{0.6464, 6.303}, {0.7426, 5.597}, {0.7014, 5.496}, {0.6189, 5.395}, {0.6464, 4.992},
{0.7289, 4.891}, {0.7426, 4.437}, {0.8802, 4.689}, {0.8664, 4.235}, {0.7976, 3.933},
{0.9077, 3.58}, {0.8664, 2.975}, {0.9627, 3.076}, {0.9352, 2.672}, {1.073, 2.773},
{1.018, 2.269}, {1.073, 1.966}, {1.155, 2.218}, {1.169, 1.714}, {1.293, 1.866},
{1.279, 1.613}, {1.306, 1.361}, {1.458, 1.563}, {1.458, 1.008}, {1.54, 1.059},
{1.623, 1.261}, {1.788, 1.059}, {1.719, 1.16}, {1.802, 0.9076}, {2.008, 0.7563},
{2.09, 0.8571}, {2.159, 1.008}, {2.242, 0.605}, {2.31, 0.6555}, {2.407, 0.8067},
{2.544, 0.8067}, {2.599, 0.6555}, {2.682, 0.4538}, {2.792, 0.7563}, {2.888, 0.4034},
{2.929, 0.7563}, {3.246, 0.5546}, {3.356, 0.4538}, {3.479, 0.4538}, {3.906, 0.4034},
{4.029, 0.4538}, {4.181, 0.3529}, {4.332, 0.2521}, {4.621, 0.2521}, {4.855, 0.2521},
{5.088, 0.3025}, {5.185, 0.3025}, {5.804, 0.3025}, {6.546, 0.3025}
};
using the following code:
nlm = NonlinearModelFit[
data,
{-c+(a b t (-2+Log[(-1+a t-a d t)/(a d t)]))/(4 (-1+a t)),a>0,b>0,c>0,d>0},
{{a,10},{b,20},{c,36},{d,0.0001}},
t
]
It gives me following fit which is obviously not correct,
$$\frac{50. t \left(\log \left(\frac{100. (9.99 t-1)}{t}\right)-2\right)}{10. t-1}-36.$$
I tried manually varying parameters and I can come up with the following fit,
With parameters $a=10$, $b=20$, $c=36.5$, $d=0.0001$.
But I want to do it using Mathematica and find the right parameters for a proper fit and not just do it by trial and error.
d
. I get a much better fit starting withd = 1/200.
$\endgroup$