I am trying to fit a polynomial function to some multi-dimensional data. However, I am getting a negative $R_{adj}^2$ as you can see:
datat = {{2.0000, 35.229, 2.61922, 1.26667, 5.9160*10^6, 14217.,
0.04422}, {2.0000, 40.522, 2.70379, 9.76264, 2.6300*10^6, 5202.0,
0.039375}, {1.0000, 24.3, 2.62143, 5.0000, 3.4141*10^6, 8163.0,
0.042542}, {2.0000, 48.87, 2.66604, 15.000, 4.8240*10^6, 10408.,
0.040983}, {2.0000, 41.59, 2.67677, 2.47553, 2.3944*10^6, 5040.0,
0.042063}, {2.0000, 39.629, 2.99468, 1.18333, 5.8163*10^6, 5888.0,
0.039648}, {2.0000, 39.618, 2.6657, 1.8, 2.3768*10^6, 5132.0,
0.038273}, {2.0000, 42.924, 2.68517, 1.2557, 2.4082*10^6, 4972.0,
0.041902}, {1.0000, 32.8, 2.48408, 5.0000, 1.8193*10^7, 59681.,
0.041759}};
lmf = LinearModelFit[datat, {1}~Join~{o, g, p, d, a, t}, {o, g, p, d, a, t}];
lmf["AdjustedRSquared"]
(*out: -0.511164*)
By definition, in 2-dimensional space an Adjusted $R^2<0$ indicates that the predicted line is worse at fitting the data than an horizontal line (if I'm not mistaken). In this 6-dimensional case, I believe a negative $R^2_{adj}$ indicates that the hyperplane is worse at describing the data than a random hyperplane.
So, my questions are:
- How is this possible? I would expect that this could happen if I didn't have a constant term in the fitting function (indicated by the
{1}
term inlmf
); - Are there other algorithms that I can use instead of the default regression one that maybe could solve this problem? (i.e. to get $R^2_{adj} = 0$ as lowest coefficient of determination)
Thanks
{1}
changes nothing. The main issue remains $\endgroup$