# How to get the "AdjustedRSquared" from FittedModel

This my result of model fit:

test = {{12., 0.2205, 0}, {24., 0.3631, 0}, {36., 0.4696,
0}, {48., 0.6112, 0}, {60., 0.7205, 0}};
fun = NonlinearModelFit[test, k*t^n - d, {n, k}, {t, d}]


We can visualize it

 ListPlot[Most /@ test]~Show~Plot[fun["BestFit"] + d, {t, 12, 60}]


So I think the parametre is very good as the visualization.And we can get the proterty "SinglePredictionErrors" form the FittedModel

fun["SinglePredictionErrors"]


{0.0145981, 0.0141301, 0.0134857, 0.0138039, 0.015592}

But how can I get the "AdjustedRSquared" from FittedModel to measure the result??

• You may feel this answer interesting. Dec 26 '15 at 10:13
– yode
Dec 26 '15 at 17:50
• Glad to meet you too, and will be more glad if you link this post back to Tieba to avoid redundant works. Dec 28 '15 at 13:22
• @xzczd But I think the current answerer have misunderstood this question.
– yode
Dec 29 '15 at 10:36
• I don't think so, though not being explicitly claimed, Jim's answer has clearly indicated that, fun@"AdjustedRSquared" returns ComplexInfinity simply because the "AdjustedRSquared" of fun is ComplexInfinity. Anyway, if you think the answerer has misunderstand you, you can just comment under the answer to further discuss with the answerer rather than sit in silence. Dec 29 '15 at 11:24

I think your model formulation is a bit odd. All of the dependent variable values are zero which makes the total sum of squares being exactly zero. And that causes the issues with fun["AdjustedRSquared"] not to mention fun["RSquared"] and many of the entries in the summary tables.

If you look at the ANOVA table, you'll see that the pieces that go into the estimate of $R^2$ are not what is desired:

fun["ANOVATable"]


Here is the model I think you want to fit:

test = {{12., 0.2205}, {24., 0.3631}, {36., 0.4696}, {48.,
0.6112}, {60., 0.7205}};
fun = NonlinearModelFit[test, k*t^n - d, {n, k, d}, {t}]

• I'm so sorry for I miss in what is nonlinear regressions.And I think NonlinearModelFit[test, k*t^n - d, {n, k}, {t}] is what I want.All the same thanks for you concern this problem.Actually I should delete this foolish question but it's include your response.So I vote it up for your help but have not accept it to be a answer in case of misleading the reader.