Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default LINEST using only some of the values in an array

Try setting the constant term to 1 and multiplying by a vector of 0's
and 1's:

=LINEST(Y10:Y100,(X10:X100$A$1)*(X10:X100<$B
$1)*IF(X10:X100,X10:X100^{0,1,2,3,4},1),1)

Note: LINEST(y,X,1) can be written in matrix terms [Inv(X'X)]X'y so
inserting extra lines of 0's into the X matrix has no effect on the
least squares estimates regardless of the y values.


On 23 May, 11:07, Incoherent
wrote:
I want to perform a 4th order curve fit on some values in an array.
I have a list of X values and a list of Y values, the X values are not in
any particular order and there are in some cases multiple instances of a
given X value. I want to make a curve fit on the Y data only when the
corresponding X values are between some set limits, set in seperate cells.

I have tried (where my limits are $A$1 and $B$1):

{LINEST(IF(X10:X100$A$1,IF(X10:X100<$B$1,Y10:Y100 )),IF(X10:X100$A$1,IF(X1*0:X100<$B$1,X10:X100^{1, 2,3,4})))}

This gives #VALUE if the limits do not encompass the whole data X range. I
guess because this results in non contiguous data in the array...

Any smart ways around this?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LINEST using only some of the values in an array Incoherent Excel Worksheet Functions 2 May 23rd 07 02:22 PM
how to use linest to get the result as ARRAY? frank Excel Worksheet Functions 1 May 7th 07 06:49 AM
Array: Counting multiple values within array Trilux_nogo Excel Worksheet Functions 4 April 16th 07 03:12 AM
How do I extract a single value from the linest array result? hil Excel Worksheet Functions 3 July 12th 06 12:37 PM
Use array to return array of values Brad Excel Worksheet Functions 2 March 30th 06 05:58 PM


All times are GMT +1. The time now is 07:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"