RSquareArray (Function)

image\trumpet2.gif Disclaimer

The RSquareArray function calculates the square of the Pearson product moment correlation coefficient, R, between two arrays of values..

Syntax

RSquareArray(IndepArray, DepArray, Size)

Returns (Double)

A numeric value containing the square of the Pearson product moment correlation coefficient, R.

Parameters

Name

Type

Description

IndDepArray

Numeric

Specifies the name of a numeric array of the independent values.

DepArray

Numeric

Specifies the name of a numeric array of the dependent values.

Size

Numeric

Sets the number of data elements (size) in the array to be evaluated.

Usage

R-Square (r2) is the coefficient of determination that measures the proportion of variation that is explained by the independent variables in a regression model. This function takes the value of CoeffR for the specified array, and squares that value. The RSquared value can be interpreted as a reflection of a linear relationship between two data sets.

The value for the Size input parameter should always be a whole number greater than 0 equal to the number of data elements in the array.

The RSquareArray function only works with one-dimensional arrays.  All array-based referencing begins with array element 1.

Example

Assigns to Value1 the RSquareArray of one 10 element array to another 10 element array:

Array: myIndDepArray [10](0), myDepArray[10](0);

{… (assign values to both arrays) }

Value1 = RSquareArray (myIndDepArray, myDepArray, 10);