Documentation/Calc Functions/RSQ

Function name:
RSQ

Category:
Statistical Analysis

Summary:
Calculate the square of the sample Pearson correlation coefficient(r2) based on the given value of data samples.

Syntax:
RSQ(DataY; DataX)

Returns:
Returns a real value which is the square of the sample Pearson correlation coefficient of values in Datay and DataX. It returns a value in the range [0,1].

Arguments:
DataY is a reference to a range of cells which is considered the first data set.

DataX is a reference to a range of cells which is considered the second data set.


 * If a cell contains text, logical values, or empty cells, then the function ignores these values. However, for logical values, TRUE is considered as 1 and FALSE as 0.
 * If DataY and DataX are empty or contain only one data point or have a different number of data points then the function returns an error value.

Additional details:

 * RSQ (also called determination coefficient) is a measure for the accuracy of an adjustment and can be used to produce a regression analysis.
 * The formula for is the square of sample PEARSON coefficient = r2 where r is:

where x̄ and ӯ are mean values.
 * For more details on the sample Pearson correlation coefficient, visit Wikipedia.

Related LibreOffice functions:
[[Special:MyLanguage/Documentation/Calc_Functions/PEARSON PEARSON]

ODF standard:
Section 6.18.66, part 2

Equivalent Excel functions:
RSQ