Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Fit vs Regress
Replies: 1   Last Post: Jul 8, 1996 1:54 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Prof. L. Seiford, IEOR, UMass, 413/545-1658

Posts: 1
Registered: 12/11/04
Fit vs Regress
Posted: Jun 26, 1996 3:08 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I received the following from a colleague.
I'm not that familiar with the package.
Does anyone have an explanation?
thanks
--larry

>Wayne and I are trying to do a little linear regression, and having trouble.
>What we want is to fit a linear form to 49 independent variables. We succeed in
>using the Fit[ ] function as follows:
> A = ReadList["test3624.mat", Number, RecordLists ->True]
> y = Array[x,49]
> z = Fit[A, y, y]
>which results in
> z = 0.178173 x[1] + 0.178173 x[2] - 0.0380162 x[3] +
> 0.0713675 x[4] + 0.178173 x[5] ET CETERA ... x[49]
>
>However, the Function Browser window shows us that we can load in the package
> <<"Statistics`LinearRegression`"
>and use the Regress[ ] function. We tried this on a super-small data set first,
>without using any subscripting of the independent variables, and it worked
>nicely and gave us lots more data about the fit than Fit[ ] gives.
>
>However, if we try the full data set with the subscripted variables as above,
>to wit:
> A = ReadList["test3624.mat", Number, RecordLists ->True]
> y = Array[x,49]
> z = Regress[A, y, y]
>we get nothing but error messages, in spite of the fact that the function
>browser suggests that Fit[ ] and Regress[ ] have identical input formats!
>
>Any ideas?








Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.