I'm trying to understand the differences between LinearModelFit
and NonlinearModelFit
. One thing I notice is that the computation of "AdjustedRSquared"
seems to be different, even when the model results are the same. Example:
data = {{1, 2}, {1, 2}, {2, 3}, {4, 6}, {5, 12}}
lm = LinearModelFit[data, x, x]
lm["AdjustedRSquared"]
nlm = NonlinearModelFit[data, b + a*x, {a, b}, x]
nlm["AdjustedRSquared"]
gives the results
{{1,2},{1,2},{2,3},{4,6},{5,12}}
FittedModel[-0.712121+2.19697 x]
0.846521
FittedModel[-0.712121+2.19697 x]
0.929883
The returned FittedModel
s are exactly the same, however the "RSquared"
differs. What exactly is going on here? Which one is a more accurate statement of $R^2$? Are my models functionally different in some way?