1
$\begingroup$

I have a set data and I know that this data are best fitted by the following equation, assuming that f($\tau$) is a log normal distribution and $M_{eq}$ = 1.5:

$M(t,\tau)= M_{eq} \int (1-e^{-t/\tau}) f(\tau) d\tau $

I was wondering if there is a way to perform a regression, i.e., by finding the best fitting curve for the given set of data (using the equation above), get the best $f(\tau)$ that improve the best fit as a by-product ?

Thanks in advance

PS.: The set of data that I'm talking about is:

data={{0.995, 0.142}, {3.003, 0.2}, {5.908, 0.25}, {10.525, 0.36}, {13.617,
0.498}, {24.321, 0.616}, {33.917, 0.599}, {47.843, 0.7}, {64.172, 
0.835}, {91.353, 1.102}, {126.745, 1.083}, {174.118, 
1.225}, {225.059, 1.133}, {292.998, 1.165}, {369.133, 
1.298}, {640.295, 1.365}, {828.169, 1.298}, {1255.39, 
1.373}, {1496.61, 1.409}, {1942.79, 1.538}}

enter image description here

$\endgroup$
4
$\begingroup$
(* Define function *)
Meq = 3/2;
g[t_?NumericQ, μ_?NumericQ, σ_?NumericQ] :=
 Meq NIntegrate[(1 - Exp[-t/τ]) E^(-((-μ + Log[τ])^2/(2 σ^2)))/(Sqrt[2 π] σ τ), {τ, 0, ∞}]

data = {{0.995, 0.142}, {3.003, 0.2}, {5.908, 0.25}, {10.525, 0.36}, {13.617, 0.498},
   {24.321, 0.616}, {33.917, 0.599}, {47.843, 0.7}, {64.172, 0.835}, {91.353, 1.102},
   {126.745, 1.083}, {174.118, 1.225}, {225.059, 1.133}, {292.998, 1.165},
   {369.133, 1.298}, {640.295, 1.365}, {828.169, 1.298}, {1255.39, 1.373},
   {1496.61, 1.409}, {1942.79, 1.538}};

(* Fit *)
nlm = NonlinearModelFit[data, {g[t, μ, σ], σ > 0}, {{μ, 4}, {σ, 2}}, t];

(* Summaries *)
nlm["ParameterTable"]

Parameter table

nlm["EstimatedVariance"]^0.5
(* 0.06762842122700316` *)

(* Show data, predictions, and 95% confidence bands for the mean *)
lower = Transpose[{data[[All, 1]], nlm["MeanPredictionConfidenceIntervals"][[All, 1]]}];
upper = Transpose[{data[[All, 1]], nlm["MeanPredictionConfidenceIntervals"][[All, 2]]}];
Show[ListLogLinearPlot[{lower, upper, data}, Joined -> {True, True, False},
  PlotStyle -> {{Dotted, Gray}, {Dotted, Gray}, Black}],
 LogLinearPlot[g[t, μ, σ] /. nlm["BestFitParameters"], {t, Min[data[[All, 1]]], Max[data[[All, 1]]]}]]

Data, fit, and confidence bands

$\endgroup$
  • $\begingroup$ Hi, JimB. Thanks for your feedback. I'd like to know if there is a way to get the distribution $f(\tau)$ without especifing it. I know that the best fit is performed when a log gaussian is used, but what I want to know is if there is a way of inferring about the best distribution a posteriori, without especifing it before. $\endgroup$ – José Augusto Devienne Aug 24 at 2:08
  • $\begingroup$ Without specifying $f(\tau)$? No. But you can use the "AIC" or "AICc" options to rank potential distributions. You can get the $AIC_c$ value for the above model with nlm["AICc"]. $\endgroup$ – JimB Aug 24 at 2:17
  • $\begingroup$ Thanks, JimB! I'll try this. $\endgroup$ – José Augusto Devienne Aug 24 at 2:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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