Linest - Why did they do that?

=?Utf-8?B?Y3NlZXRvbg==?=
Guest
Posts: n/a

 10th Mar 2005
I am having difficulty with the order of the coefficients outputed by linest
when doing a multivariable regression. My problem is that the order is
reversed from the input x variables. While for displaying the coefficients I
do not have a problem, the problem is that my sheet is setup so that the
column order is x1,x2,x3,x4... and I would like to use
mmult(inputs,transpose(output coefficient)) or Sum(inputs*ouput
coefficients) ) to fill in dataspace in other operations.

Any suggestions on a way reverse the order so that I can use it with matrix
operations without creating new columns in reverse order (involves reverse
thinking on my part).

cseeton

Eric
Guest
Posts: n/a

 10th Mar 2005
I don't know that my solution could even be called good, but I used a
modified identiy matrix
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 1 0 0 0
1 0 0 0 0
to flip a column of data to that it would work with the index() function. I
simply used mmult to multiply the column with the matrix and I had the data
in the form I needed it. It will also work if the data is in a row.
Unfortunately, this was the only work around I could find in Excel.

"cseeton" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am having difficulty with the order of the coefficients outputed by

linest
> when doing a multivariable regression. My problem is that the order is
> reversed from the input x variables. While for displaying the

coefficients I
> do not have a problem, the problem is that my sheet is setup so that the
> column order is x1,x2,x3,x4... and I would like to use
> mmult(inputs,transpose(output coefficient)) or Sum(inputs*ouput
> coefficients) ) to fill in dataspace in other operations.
>
> Any suggestions on a way reverse the order so that I can use it with

matrix
> operations without creating new columns in reverse order (involves reverse
> thinking on my part).
>
> cseeton
>

Jerry W. Lewis
Guest
Posts: n/a

 11th Mar 2005
You could use the INDEX() function to reverse the coefficients, as in
=INDEX(LINEST(B1:B6,A1:A6),1,{2,1})

My guess as to why LINEST works this way, is that if you are doing model
selection (such as testing whether a quadratic term is a significant
improvement over a linear fit), you can do the test without displaying
all the columns of LINEST output. Yes, that's pretty weak, and I would
have preseverd the order of input columns, but I didn't write it ...

Jerry

cseeton wrote:

> I am having difficulty with the order of the coefficients outputed by linest
> when doing a multivariable regression. My problem is that the order is
> reversed from the input x variables. While for displaying the coefficients I
> do not have a problem, the problem is that my sheet is setup so that the
> column order is x1,x2,x3,x4... and I would like to use
> mmult(inputs,transpose(output coefficient)) or Sum(inputs*ouput
> coefficients) ) to fill in dataspace in other operations.
>
> Any suggestions on a way reverse the order so that I can use it with matrix
> operations without creating new columns in reverse order (involves reverse
> thinking on my part).
>
> cseeton

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post pom15595 Microsoft Word Document Management 2 27th Apr 2010 11:05 AM Mr. SweatyFinger Microsoft ASP .NET 2 2nd Dec 2006 04:46 PM John Smith Microsoft Outlook 1 3rd May 2005 11:05 PM Adam@CHC Windows XP Security 4 7th Jul 2004 03:24 PM =?Utf-8?B?em9vZnVz?= Windows XP MovieMaker 14 15th Jun 2004 08:55 AM

Features