This code has performed an exponential adjustment and gets the “ParameterErrors” and “RSquared” for a exponetial model and “NonlinearModelFit”.
The code is running correctly for almost data … However, for this data, attached in the code, Mathematica is freezing during the evaluation of “ParameterErrors” and “RSquared” and “ParameterTable”.
Please. How can I evaluate this data without freezing and errors?
SystemException [“MemoryAllocationFailure”]
ClearAll["Global`*"]
ClearSystemCache[]
sizedistcum = {{1.12996, 0.}, {1.42366, 0.}, {1.7937, 0.}, {2.25992,
0.}, {2.84732, 0.}, {3.5874, 0.}, {4.51984, 0.}, {5.69464,
0.}, {7.1748, 0.}, {9.03968, 0.}, {11.3893, 0.}, {14.3496,
0.}, {18.0794, 0.}, {22.7786, 0.}, {28.6992, 0.}, {36.1587,
0.}, {45.5572, 0.}, {57.3984, 0.00215924}, {72.3175,
0.0283401}, {91.1143, 0.0537112}, {114.797, 0.0753036}, {144.635,
0.103104}, {182.229, 0.268826}, {229.594, 0.832659}, {289.27,
0.964372}, {364.457, 0.993522}, {459.187, 1.}, {578.54,
1.}, {728.914, 1.}, {918.375, 1.}, {1157.08, 1.}, {1457.83,
1.}, {1836.75, 1.}, {2314.16, 1.}, {2915.66, 1.}, {3673.5,
1.}, {4628.32, 1.}, {5831.32, 1.}, {7347., 1.}, {9256.64,
1.}, {11662.6, 1.}};
RRmodel = 1 - Exp[-(x/dm)^n];
nlm = NonlinearModelFit[sizedistcum, RRmodel, {{dm, 10}, {n, 1}}, x];
{{dm, n}} = {dm, n} /. nlm[{"BestFitParameters"}]
{{dmdev, ndev}} = nlm[{"ParameterErrors"}]
RRrsquared = nlm[{"RSquared"}]
nlm[{"ParameterTable"}]

