Previous Page Next Page Contents

stats::FCorr -- Fechner correlation

Introduction

stats::FCorr(data) returns the Fechner correlation coefficient of data pairs.

Call(s)

stats::FCorr([x1, x2, ..], [y1, y2, ..])
stats::FCorr([[x1, y1], [x2, y2], ..])
stats::FCorr(s <, cx, cy>)
stats::FCorr(s <, [cx, cy]>)

Parameters

x1, x2, .. - statistical data: arithmetical expressions.
y1, y2, .. - statistical data: arithmetical expressions.
s - a sample of domain type stats::sample.
cx, cy - integers representing column indices of the sample s. Column cx provides the data x1, x2, .., column cy provides the data y1, y2, ...

Returns

an arithmetical expression. FAIL is returned, if the data are empty.

Related Functions

stats::BPCorr, stats::sample

Details

Example 1

We calculate the Fechner correlation coefficient of four data pairs given in two lists. There is a positive linear relation y = 1+2*x between the entries of the lists:

>> stats::FCorr([0, 1, 2, 3], [1, 3, 5, 7])
   
                                     1
      

Alternatively, the data may be specified by a list of pairs:

>> stats::FCorr([[0, 0], [1, -3], [2, -4], [3, -3]])
   
                                   -1/2
      

Example 2

We create a sample consisting of one string column and two non-string columns:

>> stats::sample([["a", 0, 0], ["b", 10, 10], ["c", 20, 35]])
   
                               "a"   0   0
                               "b"  10  10
                               "c"  20  35
      

The Fechner correlation coefficient is calculated using the data columns 2 and 3. In this example there are only two non-string columns, so the column indices do not have to be specified:

>> stats::FCorr(%)
   
                                    2/3
      

Example 3

We create a sample consisting of three data columns:

>> stats::sample([[1, 0, 0], [2, 10, 10], [3, 20, 35]])
   
                                1   0   0
                                2  10  10
                                3  20  35
      

We compute the Fechner correlation coefficient of the data pairs given by the first and the second column:

>> stats::FCorr(%, 1, 2)
   
                                     1
      

Example 4

We create a sample consisting of three columns:

>> stats::sample([[1, -3, 1], [2, -8, 3], [3, -12, 5], [5, 10, 7]])
   
                                1   -3  1
                                2   -8  3
                                3  -12  5
                                5   10  7
      

We compute the Fechner correlation coefficient of the data pairs given by the second and the third column. Here we specify these columns by a list of column indices:

>> stats::FCorr(%, [1, 2])
   
                                     0
      

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000