• Conditional Functions (Excel 2003 SP2)

    Author
    Topic
    #443438

    I’ve used the conditional functions for dates that Hans wrote about in post 503094 . Here’s the formula: =AVERAGE(IF((A2:A16>=F1)*(A2:A16=$F1)*($A$2:$A$16=$F1)*($A$2:$A$16<=$F2),$C$2:$C$16)). The second data series is in C.

    I'd also like to do some conditional LINEST estimates, but that doesn't seem to work. I'm guessing there's a problem with the double array functions, but would appreciated any help or suggestions.

    Viewing 1 reply thread
    Author
    Replies
    • #1069604

      You can omit the IF for one of the two arguments – Excel will automatically exclude the values corresponding to the excluded values in the other argument. So for example (as an array formuila):

      =SLOPE(IF(($A$2:$A$16>=$F1)*($A$2:$A$16=$F1)*($A$2:$A$16<=$F2),$C$2:$C$16))

    • #1069606

      As you have found, LINEST doesn’t work this way. As a replacement, you can use the INTERCEPT, CORREL and RSQ functions in addition to SLOPE. They do work with IF the same way as SLOPE does.

      • #1069624

        What I really want that I can’t find a single function for is the standard error for the intercept. LINEST calculates it, but not STEYX. I’ll have to go back to the definition. The problem seems to be that there isn’t a direct function for the residual sum of squares. I need to compare a lot of different regressions based on some conditions. I was hoping to find an shortcut to calculating some of the statistics.

        Thanks for your help. If you know of a slick way to compute conditional SSE or MSE, that would be a big help!

        • #1069633

          I think you’ll have to go back to the formulas behind linear regression.

    Viewing 1 reply thread
    Reply To: Conditional Functions (Excel 2003 SP2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: