Re: Coefficients from Fit as a list?
- To: mathgroup at smc.vnet.net
- Subject: [mg63405] Re: [mg63396] Coefficients from Fit as a list?
- From: ggroup at sarj.ca
- Date: Fri, 30 Dec 2005 02:32:24 -0500 (EST)
- References: <200512290757.CAA16336@smc.vnet.net>
- Reply-to: ggroup at sarj.ca
- Sender: owner-wri-mathgroup at wolfram.com
On Thursday, December 29, 2005 at 02:57 GMT -0500, Lectorz wrote: > How can I store the coefficients from the Fit function as a list? Use FindFit instead: data = Table[{i, Random[] + 5 i}, {i, 10}]; Fit[data, {x, 1}, x] FindFit[data, m x + b, {b, m}, {x}][[All, 2]] Or you could use the LinearRegression package and obtain a whole lot more information in the process. << Statistics`LinearRegression` bestfit = Regress[data, {1, x}, x] (ParameterTable /. bestfit) (ParameterTable /. bestfit)[[1, All, 1]]
- References:
- Coefficients from Fit as a list?
- From: "LectorZ" <lectorz@mail.ru>
- Coefficients from Fit as a list?