Hi Christian,
to get a bit more fun in dealing with this, one defines
In[8]:= Needs["LinearRegression`"]
In[78]:= Remove[basisP, SublistFreeQ];
basisP[n_Integer?Positive, m_Integer?Positive] :=
Flatten[Table[x^o y^oo, {oo, 0, m}, {o, 0, n}]]
SublistFreeQ[l_List] := And @@ (FreeQ[#, List] & /@ l)
and types
In[123]:= ReplaceAll[Array[basisP, {11, 8}],
l_List?SublistFreeQ -> Regress[data, l, {x, y},
RegressionReport -> RSquared, ConfidenceLevel -> 0.99,
Tolerance -> 0]
] //. List[Rule[RSquared, q_?NumericQ]] -> q
Out[123]=
{{0.839822, 0.842123, 0.843836, 0.84546, 0.845645, 0.845701, 0.845751,
0.845787},
{0.844372, 0.846762, 0.848569, 0.850275, 0.850468, 0.850529, 0.850582,
0.850621},
{0.855114, 0.857626, 0.860483, 0.863794, 0.864239, 0.864331, 0.864468,
0.864503},
{0.87169, 0.874157, 0.878493, 0.883982, 0.884905, 0.885031, 0.885291,
0.885341},
{0.862507, 0.872994, 0.856717, 0.88373, 0.879338, 0.877799, 0.881134,
0.875697},
{0.868972, 0.855302, 0.877558, 0.876269, 0.882131, 0.858016, 0.754427,
0.862812},
{0.859758, 0.799549, 0.878567, 0.878971, 0.858458, 0.748621, 0.642792,
0.790891},
{0.680309, 0.873469, 0.628045, 0.812764, 0.578136, 0.683194, 0.500513,
0.775168},
{0.241052, 0.87368, 0.861535, 0.74158, 0.808226, 0.677025, 0.838108,
0.728457},
{{RSquared -> $Failed}, 0.832816, 0.85698, 0.717582, 0.327411, 0.786005,
0.671998, 0.745416},
{{RSquared -> $Failed}, 0.860777, 0.843627, 0.628244, 0.744369, 0.784522,
0.791511, 0.743666}}
to see the RSquared from a bunch of similar bases. Your model is basisP[3,
2], the
value nearest to 1 is 0.885341 at basisP[4, 8]. Running again with
Array[basisP, {7, 16}] shows that basisP[4, 8] holds the peak.
Regards
Udo.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/