H
Help Me
The RSQ() denominator is the product of two expressions, each
of the form: n*SUMPRODUCT({y}^2) - SUM({y})^2.
When each cell of {y} is the same value, the expression evaluates
to zero [1]. Consequently, the denominator of RSQ() is zero.
For some same-valued {y}, RSQ() returns zero. But for other
same-valued {y}, RSQ() returns a divide-by-zero error.
First, why does RSQ() behave differently for different same-valued
{y}?
I might guess that floating-point round-off (quantization) error
causes some expressions not to be zero. But when I compute the
expression in a cell, the result is zero for both of the same-valued
{y} that result in different behavior. I presume that rules out
floating-point round-off error as an explanation.
Second, how can I detect the function error and replace it with
zero, short of computing each component of the RSQ() demoninator
in an IF() statement?
I vaguely recall that I can use a custom format to accomplish
this. But I have not been able to figure out how. An explicit
example would be appreciated.
Third, if this is a known defect that has been fixed, can someone
tell me the version or patch id of Excel that fixes this?
I am currently using Excel 2002 (10.4302.4219) SP-2. I think
RSQ() should tolerate a zero denominator since I think it is not
unusual for each cell of {y} to have the same value (horizontal
line).
of the form: n*SUMPRODUCT({y}^2) - SUM({y})^2.
When each cell of {y} is the same value, the expression evaluates
to zero [1]. Consequently, the denominator of RSQ() is zero.
For some same-valued {y}, RSQ() returns zero. But for other
same-valued {y}, RSQ() returns a divide-by-zero error.
First, why does RSQ() behave differently for different same-valued
{y}?
I might guess that floating-point round-off (quantization) error
causes some expressions not to be zero. But when I compute the
expression in a cell, the result is zero for both of the same-valued
{y} that result in different behavior. I presume that rules out
floating-point round-off error as an explanation.
Second, how can I detect the function error and replace it with
zero, short of computing each component of the RSQ() demoninator
in an IF() statement?
I vaguely recall that I can use a custom format to accomplish
this. But I have not been able to figure out how. An explicit
example would be appreciated.
Third, if this is a known defect that has been fixed, can someone
tell me the version or patch id of Excel that fixes this?
I am currently using Excel 2002 (10.4302.4219) SP-2. I think
RSQ() should tolerate a zero denominator since I think it is not
unusual for each cell of {y} to have the same value (horizontal
line).