Re: Regression
- To: mathgroup at smc.vnet.net
- Subject: [mg73949] Re: Regression
- From: dh <dh at metrohm.ch>
- Date: Sat, 3 Mar 2007 01:17:48 -0500 (EST)
- References: <es6dr1$s76$1@smc.vnet.net>
Hi Anurag, your "polynomial" is a list of 27 base functions. Therefore, you are trying to fit 27 expansion coefficients. If your data contains mesurements errors, this is not meaningfull. You should always have more data points than parameters (< Sqrt[number of data points]). Daniel Anurag wrote: > Hi, > I am doing regression using mathematica. The code is > simple. I define a polynomial. Read the data points > from a file. I make sure that there are 27 data points > in the file and all the 27 data points are unique. > > polynomial = Flatten[Table[x^i y^j z^k, {i, 0, 2}, {j, > 0, 2}, {k, 0, 2}]]; > > dataf = ReadList["C:\\Debug\\ForRegression.txt", > Number, RecordLists -> True]; > > datafromfile = Transpose[dataf]; > > RegResult = Regress[dataf, polynomial, {x, y, z}] > > I am getting error > "Regress::mindata: The number of parameters to be > estimated is greater than or > equal to the number of data points. Subsequent > results may be misleading. > > DesignedRegress::rank: Warning: the rank of the design > matrix is 25, less \ > than full rank 27. Only 25 of the 27 basis functions > are needed to provide \ > this fit. Try using a different model or greater > precision." > > > Kindly help me fix the problem > > > > > ____________________________________________________________________________________ > Do you Yahoo!? > Everyone is raving about the all-new Yahoo! Mail beta. > http://new.mail.yahoo.com >