Bug 105512 - CORREL() function cannot calculate correlation of a row and column, results in Err:502 / Invalid argument
Summary: CORREL() function cannot calculate correlation of a row and column, results i...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.2.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks:
 
Reported: 2017-01-24 20:18 UTC by Daniel Trebbien
Modified: 2017-01-25 00:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case (8.27 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-01-24 20:18 UTC, Daniel Trebbien
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Trebbien 2017-01-24 20:18:19 UTC
Created attachment 130666 [details]
Test case

The CORREL() function to calculate the correlation between two cell ranges should allow one of the ranges to be a range in one row, and the other to be a range in one column.  For example, =CORREL(A1:A5,B1:F1) should calculate the correlation between the five cells in column A at A1:A5 and the five cells in row 1 at B1:F1.

This is supported by Apple Numbers version 4.0.5 and Microsoft Excel 2000.
Comment 1 m_a_riosv 2017-01-25 00:24:32 UTC
Looks ODF definition daesn't allow that.
"
6.18.17
CORREL
Summary:
 Calculates the correlation coefficient of values in N1 and N2.
Syntax:
 CORREL( ForceArray Array N1 ; ForceArray Array N2 )
Returns:
 Number
Constraints:
 COLUMNS(N1) = COLUMNS(N2), ROWS(N1) = ROWS(N2), both sequences shall
contain at least one number at corresponding positions each.
Semantics:
 Has the same value as COVAR(N1;N2)/STDEVP(N1)*(STDEVP(N2)). The CORREL
function actually is identical to the PEARSON function.
For an empty element or an element of type Text or Boolean in 
N1  the element at the corresponding position of N2  is ignored, and vice versa
"
Perhaps could be an acceptable request for enhacement for compatibility reasons.

BTW can be solved using TRANSPOSE() function
=CORREL(A1:A5;TRANSPOSE(B1:F1))